Guide to Competitive Programming

Learning and Improving Algorithms Through Contests

  • Antti Laaksonen

Part of the Undergraduate Topics in Computer Science book series (UTICS)

Table of contents

  1. Front Matter
    Pages i-xii
  2. Antti Laaksonen
    Pages 1-7
  3. Antti Laaksonen
    Pages 9-25
  4. Antti Laaksonen
    Pages 27-36
  5. Antti Laaksonen
    Pages 37-49
  6. Antti Laaksonen
    Pages 51-62
  7. Antti Laaksonen
    Pages 63-75
  8. Antti Laaksonen
    Pages 77-106
  9. Antti Laaksonen
    Pages 107-117
  10. Antti Laaksonen
    Pages 119-129
  11. Antti Laaksonen
    Pages 131-146
  12. Antti Laaksonen
    Pages 147-187
  13. Antti Laaksonen
    Pages 189-209
  14. Antti Laaksonen
    Pages 211-224
  15. Antti Laaksonen
    Pages 225-237
  16. Antti Laaksonen
    Pages 239-268
  17. Back Matter
    Pages 269-283

About this book


This invaluable textbook presents a comprehensive introduction to modern competitive programming. The text highlights how competitive programming has proven to be an excellent way to learn algorithms, by encouraging the design of algorithms that actually work, stimulating the improvement of programming and debugging skills, and reinforcing the type of thinking required to solve problems in a competitive setting. The book contains many “folklore” algorithm design tricks that are known by experienced competitive programmers, yet which have previously only been formally discussed in online forums and blog posts.

Topics and features:

  • Reviews the features of the C++ programming language, and describes how to create efficient algorithms that can quickly process large data sets
  • Discusses sorting algorithms and binary search, and examines a selection of data structures of the C++ standard library
  • Introduces the algorithm design technique of dynamic programming, and investigates elementary graph algorithms
  • Covers such advanced algorithm design topics as bit-parallelism and amortized analysis, and presents a focus on efficiently processing array range queries
  • Surveys specialized algorithms for trees, and discusses the mathematical topics that are relevant in competitive programming
  • Examines advanced graph techniques, geometric algorithms, and string techniques
  • Describes a selection of more advanced topics, including square root algorithms and dynamic programming optimization

This easy-to-follow guide is an ideal reference for all students wishing to learn algorithms, and practice for programming contests. Knowledge of the basics of programming is assumed, but previous background in algorithm design or programming contests is not necessary. Due to the broad range of topics covered at various levels of difficulty, this book is suitable for both beginners and more experienced readers.

Dr. Antti Laaksonen has worked as a teacher and researcher at the University of Helsinki and Aalto University, Finland. He has served as one of the organizers of the Finnish Olympiad in Informatics since 2008, and as the Scientific Chair of the Baltic Olympiad in Informatics in 2016. He has also coached and led the Finnish team at several international programming contests, including the International Olympiad in Informatics 2009–2016, and has established experience in teaching programming and algorithms.​


Programming Algorithms Contests Software engineering Problem solving

Authors and affiliations

  • Antti Laaksonen
    • 1
  1. 1.Department of Computer ScienceUniversity of HelsinkiHelsinkiFinland

Bibliographic information

Industry Sectors
Finance, Business & Banking
IT & Software
Energy, Utilities & Environment