I'm a junior in college, majoring in Computer Science, but I'm having a hard time approaching CS problems.. I'm at a very prestigious university with a tough curriculum, but I'm still able to keep up in class and solve the assignments, because we are generally told what data structures / algorithms we should be using, and at the end of the day it's just a matter of implementing them.
In regards to complex algorithms we cover in lecture, I find that I don't really understand them during lecture, but after a lot of self-study, I can get to the point where I can reproduce the steps of the algorithm on paper and have a basic understanding of the steps (i.e for Djikstra's write down the current state of the priority queue of distances), but this is somewhat mechanical, and I don't feel as if I really get the algorithm (i.e intuitively understand how it works, or see why it's the best possible algorithm for a certain task).
Another place where this manifests itself is in interview questions, or if I'm trying to solve problems on sites like InterviewStreet / TopCoder (they are algorithm based programming challenges). Most of the times, I simply can't come up with a good answer, but after someone tells me the answer I can understand it. This isn't always the case, but it is a lot of times. I find that I get easily confused when trying to reason about complex problems - understand which algorithms/data structures would apply, calculating the time complexity of different approaches.
I love computers, and am skilled at application - stuff that a real programmer would do in most cases - web apps, mobile apps, scripts, networking, but I'm having a hard time with algorithms and theory - which is really what CS is about. I'm not going to switch majors to something more application based because I'm confident I can learn those things on my own. I'd rather utilize this time to learn CS, especially given that my university is excellent at it.
I've been active on the forums for a while, and I know that the XKCD community is brilliant at theoretical aspects, so I'd like your advice. How can I become better at understanding algorithms and CS theory? Any advice on how to think about problems, books to read/problems to solve or anything else is appreciated.