This textbook features new material on advanced topics, such as calculating Fourier transforms, finding minimum cost flows in graphs, and using automata in string problems. Critically, the text accessibly describes and shows how competitive programming is a proven method of implementing and testing algorithms, as well as developing computational thinking and improving both programming and debugging skills.Topics and features:Introduces dynamic programming and other fundamental algorithm design techniques, and investigates a wide selection of graph algorithmsCompatible with the IOI Syllabus, yet also covering more advanced topics, such as maximum flows, Nim theory, and suffix structuresProvides advice for students aiming for the IOI contestSurveys specialized algorithms for trees, and discusses the mathematical topics that are relevant in competitive programmingExamines the use of the Python language in competitive programmingDiscusses sorting algorithms and binary search, and examines a selection of data structures of the C++ standard libraryExplores how GenAI will impact on the future of the fieldCovers such advanced algorithm design topics as bit-parallelism and amortized analysis, and presents a focus on efficiently processing array range queriesDescribes a selection of more advanced topics, including square-root algorithms and dynamic programming optimizationFully updated, expanded and easy to follow, this core textbook/guide is an ideal reference for all students needing to learn algorithms and to practice for programming contests. Knowledge of programming basics is assumed, but previous background in algorithm design or programming contests is not necessary. With its breadth of topics, examples and references, the book is eminently suitable for both beginners and more experienced readers alike.