I'm trying to find an online source or textbook with problems+solutions for problems in dynamic programming, number theory, graph theory, greedy algorithms, etc. Do you know of any?
Based on clarification in comments, Algorithms 4th ed. by Sedgewick and Wayne seems to meet your criteria. The book itself doesn't seem to have an official PDF version (I haven't searched for unofficial ones of dubious provenance), but the code is available both at the linked page and on Github, and includes solutions to selected exercises.
There are a number of sites with challenges- once you complete a challenge you can often view other solutions, and many of these sites (not all) support multiple languages.
Even the "Python Challenge" tasks can be solved with another language since all you are looking for each time is the next url. A scan of each site will give you a good idea if the problem sets are useful, or if they spark ideas for your own challenges.
Worth a look I think.