There are tons of books on algorithms. Most of them don’t cover all the topics a well trained competitive programmer should learn, and many do not talk about implementation at all. Here is a personal selection among freely available books.
- Algorithms, by Jeff Erickson
- CP-Algorithms, responsive translations from Russian website e-maxx.ru/algo
- Guide to competitive programming, by Antti Laaksonen
- PEGWiki, the great wiki of the Programming Enrichment Group (Woburn Collegiate Institute, Toronto, Canada)
- matthewsamuel95/ACM-ICPC-Algorithms (by algorithm then language)
- kvaluruk/Data-Structures-And-Algorithms-… (by language then algorithm)
- ZoranPandovski/al-go-rithms (messy)