Several algorithms textbooks (and textbook-like collections of materials) are freely available online. It is well worth researching a given topic in multiple sources, because each can provide a perspective or explanation that adds something the others do not. These are very roughly ordered by decreasing quality and ease of use.
Note: Some of these are more focused on data structures than specifically on algorithms, but the two are so intertwined that you’ll need elements of each no matter which you’re studying.
- Algorithms, Etc. — a textbook and other course materials from Jeff Erickson. Well explained and well presented. Contains a large number of example homework assignments and exams, as well as links to many other resources.
- Data Structures — course materials from Ray Toal. Very nice explanations with good diagrams and example Java code throughout.
- VisuAlgo — Visualizations can be very helpful when learning how a data structure or algorithm functions. Watching as progress is made and the state changes step-by-step can be so much clearer than trying to read code, pseudocode, or a written explanation of the process.
- Principles of Algorithmic Problem Solving by Johan Sannemo. Oriented toward preparing for competitive programming competitions, this book draft (not entirely finished) covers many fundamental algorithm types and commonly studied algorithms.
- Data Structures & Algorithm Analysis by Clifford A. Shaffer. Available in both Java and C++, and covers a wide range of topics. Alternatively, the same material is available in a more interactive form in OpenDSA.
- Foundations of Computer Science (C edition) by Aho and Ullman. I used this textbook the first time I taught the course. All code examples are in C.
- Open Data Structures by Pat Morin. More focused on data structures than algorithms (as the name might imply), this is available in several formats (HTML, PDF, physical paperback) and in several languages (Python, Java, C++).
- Algorithms by Sedgewick and Wayne. While the website only contains excerpts from the textbook, these provide very clear, concise overviews of all of the important concepts.
- And if that’s not enough, a huge list of freely available programming books is being maintained on Github. The Algorithms & Data Structures sublist is most relevant to this course.
There is a wealth of information out there. The ability to sift through and recognize the most valuable bits is increasingly important. I’ve done a lot of that in curating the readings for this course, but it wouldn’t hurt to do some yourself. There is more out there than what I’ve collected.