Introduction to Algorithms by Cormen et al would be a good place to start if you're going the theoretical way. Very mathmatical and not so practical - I read this myself at uni and I learned a ton.
http://www.amazon.com/Introduction-Algorithms-Thomas-H-Corme...