Best books for Competitive Programming

1.Competitive Programming 3

Competitive Programming 3 by Steven Halim is a comprehensive guide for competitive programmers, providing data structures, algorithms, and programming tips for university students, high school students, coaches, and anyone interested in computer programming. It uses C++, Python, Java, and OCaml code.

Rated 4.5 on Goodreads.

This book can be purchased on Amazon.

2.Guide to Competitive Programming: Learning and Improving Algorithms Through Contests (Undergraduate Topics in Computer Science)

This updated textbook offers a comprehensive introduction to competitive programming, covering advanced topics such as calculating Fourier transforms, finding minimum cost flows in graphs, and using automata in string problems. It demonstrates how competitive programming is a proven method for implementing and testing algorithms, developing computational thinking, and improving programming and debugging skills. The text introduces dynamic programming and other fundamental algorithm design techniques, investigates graph algorithms, reviews C++ programming language features, discusses sorting algorithms and binary search, covers advanced algorithm design topics like bit-parallelism and amortized analysis, and discusses square-root algorithms and dynamic programming optimization. This core textbook is suitable for both beginners and experienced readers, providing a comprehensive and easy-to-follow guide for learning algorithms and practicing for programming contests.

Rated 4.7 on Amazon.

This book can be purchased here.

3.Programming Challenges: The Programming Contest Training Manual (Texts in Computer Science)

This book provides a comprehensive guide to improving algorithmic and coding skills through international programming competition-type problems. It includes over 100 programming challenges, along with the theory and key concepts needed for their approach. The book is organized by topic and supplemented by tutorial material, allowing readers to gain a concrete understanding of algorithmic techniques and advanced coding topics. It offers online judging, practice training for major programming contests, and supports all popular programming languages (C, C++, Pascal, Java). The book is written by Steven S. Skiena, a computer science faculty member at SUNY Stony Brook, and Miguel Revilla, the official website archivist of the ACM ICPC and creator/maintainer of the primary robot-judge, contest-hosting website.

Rated 4.3 on Amazon.

This book is available here.

4.The Pragmatic Programmer: 20th Anniversary Edition, 2nd Edition: Your Journey to Mastery 

The Pragmatic Programmer is a tech audiobook written by Dave Thomas and Andy Hunt in 1999 to help clients create better software and rediscover the joy of coding. The book has spawned hundreds of books, screencasts, and audio books, as well as thousands of careers and success stories. Now, 20 years later, the new edition re-examines what it means to be a modern programmer, covering topics such as personal responsibility, career development, and architectural techniques for keeping code flexible and easy to adapt. Using these lessons daily can lead to improvements in personal productivity, accuracy, and job satisfaction. The audiobook is organized into sections, with Anna Katarina reading and Dave and Andy occasionally providing their insights.

Rated 4.8 on Amazon.

You can buy this book an

5.Competitive Programming in Python

Learn algorithmic techniques and programming skills for job interviews and coding competitions with this book. The authors, coaches, problem setters, and jurors, cover 128 Python algorithms, including classic problems like Dijkstra’s shortest path algorithm and Knuth-Morris-Pratt’s string matching algorithm. They also cover lesser-known data structures like Fenwick trees and Knuth’s dancing links. The book provides a framework for problem-solving, including definition, complexity, applications, algorithm, key information, implementation, variants, in practice, and problems. Python code is included in the book and on the companion website.

Rated 4.0 on Amazon.

You can buy this book here.

6.Elements of Competitive Programming : Dynamic Programming (88 Problems with Solutions): A Functional Approach

This book, infused with the wisdom of Richard Bellman, focuses on formulating problem solutions using dynamic-programming recurrence relations, defining optimal value functions, evaluating feasibility and computational magnitude, and demonstrating how dynamic programming can be used analytically to establish optimal solutions. It is designed for students preparing for competitive programming and is useful for analyzing common errors, reviewing methods, and discussing algorithm fundamentals. The book contains 88 instructional problems graded for students to learn the art of formulating and solving problems using dynamic programming. The book provides a functional approach to solving problems using dynamic programming, focusing on unconventional and integrated science of dynamic programming. Although primarily aimed at serious programmers, it also imparts knowledge to computer scientists.

You can purchase this book here.

7.Introduction to Algorithms, fourth edition

Introduction to Algorithms, a leading algorithm text, has been updated with new material on bipartite graphs, online algorithms, and machine learning. The fourth edition includes new chapters, 140 new exercises, and 22 new problems. The book is now more personal, gender-neutral, and updated with color for better visual presentation. It has also been updated with new supplementary material and a website.

Rated 4.5 on Amazon.

You can purchase this book on

8.Algorithms (Second Edition): for Competitive Programming

This book is a comprehensive resource for software engineers preparing for programming contests and interviews. It covers various algorithms and data structures, including backtracking, bitset, quickselect, radius sort, LCA, Hungarian algorithm, Pick’s theorem, modular multiplicative inverse, Josephus – O(k log n), Jacobis’ Square Root, Rabin-Karp algorithm, and sliding window. The book provides detailed explanations and source code for each algorithm, including a brief description of its workings and a source code implementing the theory behind the algorithm. The book also includes exercises and solutions, as well as appendices with non-trivial solutions. The source code for the exercises and other algorithms can be found on the GitHub page. The authors have written the book due to their passion for algorithms, training for programming competitions, coaching, and tech industry experience. The book aims to provide valuable insights for those preparing for programming competitions and interviews.

Rated 3.5 on Amazon.

You can buy this book here.

Leave a Reply

Your email address will not be published. Required fields are marked *