Algorithms online problems
Cormen, Leiserson, Rivest and Stein's Introduction to Algorithms (MIT Press, 3rd edition, 2009) is a good book for understanding and solving time complexity and correctness of
algorithms mathematically.