[1] https://books.google.com/books?id=PPc_2qUhXrAC&pg=PA1&source...
[2] https://www.amazon.com/Mathematical-Proofs-Transition-Advanc...
[3] https://books.google.com/books?id=n0tuBAAAQBAJ&pg=PA4&source...
[4] https://books.google.com/books?id=J9RLuhDRWGQC&pg=PR6&source...
If you're on a budget, check out the free ones like [1] Book of Proof by Richard Hammack, [2] Math Foundations of Computing by Keith Schwarz
[1] https://www.people.vcu.edu/~rhammack/BookOfProof/
[2] https://web.stanford.edu/class/cs103/notes/Mathematical%20Fo...
One of the dirty little secrets of studying CS and math is that truly understanding 2 problems of the kind you've never seen before in 1 day is OK and expected. Hell, sometimes mere understanding of one single solution to a problem can take a week or longer. Most anyone who does better has either studied the (adjacent) material before or just trudging along half-understanding this bit and that piece hoping that sometime in the future it might all come together. And that's exactly what happens after you stick with it for awhile (often several years). Your job is to understand the thought process and philosophy of math. It's usually called "math maturity". Math/CS people reuse the same tips and tricks over and over again under many different guises and after a while you'll start seeing this repetition and even start using them yourself. It's very similar to how you learned your own native tongue. Luckily, math folk have methods to rein in this madness.
Check out [0]. It's free and teaches you some basics of structured thought. Then check out [1], [2], [3] to expand on what you've learned.
One really good unpretentious algo book that shows you how to do problems is [4].
[0] BOOK OF PROOF by Richard Hammach
https://www.people.vcu.edu/~rhammack/BookOfProof/
[1] Discrete Mathematics with Applications by Susanna Epp
https://www.amazon.com/Discrete-Mathematics-Applications-Sus...
[2] Pure Mathematics for Beginners by Steve Warner
https://www.amazon.com/Pure-Mathematics-Beginners-Rigorous-I...
[3] Mathematical Proofs by Gary Chartrand et al
https://www.amazon.com/Mathematical-Proofs-Transition-Advanc...
[4] Data Structures and Algorithms: Concepts, Techniques and Applications by G.A.V. Pai
https://www.amazon.com/gp/product/0070699577/ref=ppx_yo_dt_b...
Good Luck and don't f*ck it up!