A curated list of awesome competitive programming / algorithm / data structure resources.
This list was created with a view to connect more people to information. It's aimed to cover a wide range of aspects and be a useful list for all.
(link status powered by dkhamsing/awesome_bot)
Please kindly follow CONTRIBUTING.md to get started (including TODOs).
What to learn / What to look for.
- IOI Syllabus
A detailed syllabus on which IOI contestants will be tested. This is still somewhat relevant to ACM-ICPC. - Programming Camp Syllabus
It was said to be an unofficial syllabus for ACM-ICPC.
A list of awesome curated lists.
- Good Blog Post Resources about Algorithm and Data Structures - Codeforces
A collection of fantastic tutorial blog posts written by Codeforces users. Some intriguing ones include Palindromic Trees, Policy Based Data Structures, and a lot more. - Data Structures and Algorithms - CodeChef Discuss
A very complete list of competitive programming resources. A must-have in your browser bookmark. - hkirat/awesome-competitive-coding
This list collected materials for some relevant topics in competitive programming.
Sites with awesome articles.
In addition to the List of Lists section above,
Here are some additional ones:
- topcoder Data Science Tutorials
This is a list of tutorials written by respected topcoder members. Many top programmers started learning data sciences from here. - E-Maxx (Russian), (English)
Emaxx is widely used in the Russian-speaking competitive programming scene. Only a small fraction of the original site is translated into English, but Google Translate would work okay. - Algorithms | GeeksforGeeks
Geeksforgeeks has a large amount of nicely written articles on different topics. It is a great complimentary resource for algorithm courses. - PEGWiki
PEGWiki is arguably much better than Wikipedia. It houses amazing in-depth wiki-like writeups on many topics. - algolist (Russian)
algolist is a website devoted to algorithms of all sorts. - 演算法筆記 (Algorithm Notes) (Chinese)
演算法筆記 is one of the most popular tutorial websites among the Taiwanese competitive programming community. The maintainer for this website spends immense efforts on researching algorithms. - 国家集训队论文 1999-2015 (Papers from Chinese IOI training camps) (Chinese)
These are papers from the Chinese IOI training camps. It's interesting for the fact that one can tell different regions emphasize different things. - LeetCode Video Tutorials
A set of videos explaining LeetCode problems. - 数据结构与算法/leetcode/lintcode题解 (LeetCode tutorials) (Chinese)
This site offers tutorials on popular interview topics.
Algorithm / Data structure implementations.
It is advised that you write your own ones before looking at others'.
- CodeLibrary, by Andrey Naumenko (indy256)
This site contains a large amount of implementations for algorithms and data structures in Java and C++. You may also visit his GitHub Repository. - Stanford University ACM Team Notebook (2014-15)
Stanford's team notebook is well maintained and the codes within are high-quality. - SuprDewd/CompetitiveProgramming, by team viRUs from Reykjavik University
One of the very few notebooks to include a tester (even integration with Travis CI). A great notebook to learn from. - bobogei81123/bcw_codebook, by team bcw0x1bd2 from National Taiwan University
bcw0x1bd2 is the team representing National Taiwan University for the 2016 ACM-ICPC World Finals. Nice implementations for advanced data structures and algorithms. - foreverbell/acm-icpc-cheat-sheet
A notebook with some advanced data structures and algorithms. - Spaghetti Source - 各種アルゴリズムの C++ による実装 (Japanese)
A neatly categorized notebook in Japanese. This website is no longer being updated, but the topics discussed here are still relevant. - igor's code archive
A good notebook by Igor Naverniouk who is currently a software engineer at Google and part of the Google Code Jam team.
This section mainly focuses on languages and other miscellaneous knowledge.
- Power up C++ with the Standard Template Library: Part 1 – topcoder
Power up C++ with the Standard Template Library: Part 2 – topcoder
Learn how to use basic C++ standard template libraries. - Yet again on C++ input/output - Codeforces
Learn more about C++ I/O optimizations. - C++ Tricks - Codeforces
What are some cool C++ tricks to use in a programming contest? - Quora
Plentiful C++ tricks for competitive programming. Note that some should be used with care. - C++ STL: Policy based data structures - Codeforces
C++ STL: Policy based data structures. Part 2 - Codeforces
Detailed introduction to the extra data structures implemented in GNU C++.
The official documentation can be found here. - C++11 FAQ (English, Chinese, Russian, Japanese, Korean)
A list of FAQs regarding C++11 collected and written by Bjarne Stroustrup, the creator of C++.
- How to read input in Java — tutorial - Codeforces
Learn how to read input faster. This is a must-read for those who intend to use Java for competitive programming. - How to sort arrays in Java and avoid TLE - Codeforces
Some tips on how to avoid hitting the worst case of quick sort. - Java.math.BigInteger Class - TutorialPrint
A quick reference for the famous BigInteger class in Java. - BigNum arithmetic in Java — Let's outperform BigInteger! - Codeforces
A basic but faster custom BigInteger class. - EZ Collections, EZ Life (new Java library for contests) - Codeforces
A Java library for contests written by Alexey Dergunov (dalex). ArrayList, ArrayDeque, Heap, Sort, HashSet, HashMap, TreeSet, TreeMap, TreeList and pair classes are implemented.
- Bit Twiddling Hacks
A huge compiled list of bit manipulation tricks. - Comparing Floating Point Numbers, 2012 Edition | Random ASCII
This post teaches everything one needs to know about floating point numbers. A must read especially for geometry topics. - 你应该知道的浮点数基础知识 • cenalulu's Tech Blog (Chinese)
Similar post on floating point numbers. - Object-Oriented C Style Languages: C++, Objective-C, Java, C# - a side-by-side reference sheet
A detailed side-by-side reference sheet. This is very helpful for a C++ programmer who wants to learn Java (for BigInteger mostly).
It's highly recommended that you begin your competitive programming journey with these awesome courses!
- Stanford CS 97SI: Introduction to Competitive Programming Contests
This course offers comprehensive lecture slides and a short list of exercise problems. - Reykjavik T-414-ÁFLV: A Competitive Programming Course
An awesome course taught by Bjarki Ágúst Guðmundsson (SuprDewd). These lectures feature neat slides and a nice list of problems to practice. - NCTU DCP4631: Problem Solving and Programming Techniques
A course on basic topics featuring good lecture slides. - 建國中學資訊科培訓 (CKHS Training) (Chinese)
Good lecture materials made by CKHS Infor Club.
A list of recommended books for competitive programming.
- Competitive Programming, by Steven and Felix Halim
This book contains a collection of relevant data structures, algorithms, and programming tips. It's a well-received book.
The first edition is free for download. - Programming Challenges: The Programming Contest Training Manual, by Steven Skiena and Miguel Revilla
This book includes more than 100 programming challenges, as well as the theory and key concepts necessary for approaching them. Problems are organized by topic, and supplemented by complete tutorial material. - Looking for a Challenge, written by a group of authors associated with the Polish Olympiads
Most of the problems described in the book are really hard but they are explained in such a way that even beginners can understand.
It appears to be out of stock (as of Feb 10, 2016), but you can reserve one on their official website. - The Hitchhiker’s Guide to the Programming Contests, by Nite Nimajneb
This book is free for download. This book covered various topics relevant to competitive programming. - プログラミングコンテストチャレンジブック (Japanese), by 秋葉拓哉, 岩田陽一, 北川宜稔
培養與鍛鍊程式設計的邏輯腦:世界級程式設計大賽的知識、心得與解題分享 (Chinese Traditional) - 算法竞赛入门经典 (Chinese), by 刘汝佳
The Art of Algorithms and Programming Contests (English)
打下好基礎:程式設計與演算法競賽入門經典 (Chinese Traditional) - 算法竞赛入门经典——训练指南 (Chinese), by 刘汝佳, 陈锋
提升程式設計的解題思考力─國際演算法程式設計競賽訓練指南 (Chinese Traditional) - 算法艺术与信息学竞赛 (Chinese), by 刘汝佳, 黄亮
- Introduction to Algorithms, by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein
Also known as CLRS (taken from name initials), this book is often referred to as the "bible" for algorithms and data structures. It's one of the most popular textbooks for university algorithm courses. This book covered various algorithms and data structures in great detail. The writing is more rigorous and can be difficult to some. - Algorithm Design, by Jon Kleinberg and Éva Tardos
This book revolves around techniques for designing algorithms. It's well-organized and written in a clear, understandable language. Each chapter is backed with practical examples and helpful exercises. The chapter on network flow is highly praised by lots.
The lecture slides that accompany the textbook are available on its official website. - The Algorithm Design Manual, by Steven S. Skiena
The book is written in more readable text. Some find it comprehensive than other books. You can also find some good resources (including the author's own video lectures) on its official website. - Algorithms, by Robert Sedgewick and Kevin Wayne
This book is neatly categorized, coupled with elaborate explanations and fantastic illustrations.
- Discrete Mathematics and Its Applications, by Kenneth H. Rosen
Discrete Mathematics is closely relevant to competitive programming. This book provides comprehensive materials on a wide range of topics including: Logics and Proofs, Sets, Functions, Sequences, Matrices, Number Theory, Recursion, Counting, Probablity, Graphs, Trees and Boolean Alegra to name but a few. - Concrete Mathematics: A Foundation for Computer Science, by Ronald L. Graham, Donald E. Knuth, Oren Patashnik
The book offers a deeper look into Discrete Mathematics with more stresses on number-related topics. - Linear Algebra and Its Applications, by David C. Lay, Steven R. Lay, Judi J. McDonald
The book does a good job at bridging the gap between a physical system (for scientists and engineers) and an abstract system (for mathematicians). - How to Solve It: A New Aspect of Mathematical Method, by G. Polya
An old-time classic. Overall, the author provides a systematic way to creatively solve problems.
Good online judges / contest platforms to practice.
- Codeforces
Codeforces is one of the most popular contest platforms in the world. Currently maintained by Saratov State University, it features regular contests and numerous awesome original problems. Every contest provides immediate helpful tutorials. Furthermore, many warm-hearted Codeforces members kindly answers questions on Codeforces. One would indeed learn and improve tremendously here. - TopCoder
TopCoder has been around since 2001. Rich in history, It's considered to be one of the most prestigious organizations when it comes to technology competitions. Hundreds of SRMs gave birth to an abundant problemset. Problems here are typically more challenging than others. Hence, TopCoder draws many elite programmers to compete and practice here. It has arguably been on a decline, but it still is a superb platform to practice. The annual TopCoder Open is also a widely-discussed event. - Google Code Jam
Google Code Jam is certainly one of the most highly-esteemed programming competitions. The competition consists of unique programming challenges which must be solved in a fixed amount of time. Competitors may use any programming language and development environment to obtain their solutions. - CodeChef
CodeChef is a non-profit educational initiative of Directi. It's a global competitive programming platform and has a large community of programmers that helps students and professionals test and improve their coding skills. Its objective is to provide a platform for practice, competition and improvement for both students and professional software developers. Apart from this, it aims to reach out to students while they are young and inculcate a culture of programming in India. - SPOJ
The SPOJ platform is centered around an online judge system. It holds a staggering amount of problems prepared by its community of problem setters or taken from previous programming contests, some of which are great problems for practice (refer to the Problem classifiers section). SPOJ also allows advanced users to organize contests under their own rules. - Timus
Timus Online Judge is the largest Russian archive of programming problems with automatic judging system. Problems are mostly collected from contests held at the Ural Federal University, Ural Championships, Ural ACM ICPC Subregional Contests, and Petrozavodsk Training Camps. - SGU
SGU is an old-school online judge maintained by Saratov State University. A high-rated competitive programmer - Huang I-Wen (dreamoon) thinks that it's the hardest online judge because its problems require unusual skills. - HDU
HDU is an online judge maintained by Hangzhou Dianzi University. It holds a pretty nice problemset. Users can also run virtual contests on this platform. - UVa
An old-school problem archive / online judge with rich history. Thousands of problems, including many classic ones, are featured here. However, it is strongly advised that you practice with uHunt following its "Competitive Programming Exercise" section. - HackerRank
HackerRank is a company that focuses on competitive programming challenges for both consumers and businesses. HackerRank's programming challenges can be solved in a variety of programming languages (including, but not limited to, Java, C++, PHP, SQL) and span multiple computer science domains. - POJ
POJ is an online judge maintained by Peking University. It holds a large amount of great problems. - Project Euler
There are lots of good math problems on this site. You may also discuss with others on its forum. - Hackerearth
HackerEarth is a startup technology company based in Bangalore, India that provides recruitment solutions. Its clients include Adobe, Altimetrik, Citrix Systems, InMobi, Symantec and Wipro. - Aizu Online Judge
Aizu online judge is a contest platform and problem archive hosted by The University of Aizu. It has a lot of great problems from programming competitions in Japan.
Sites classifying programming problems.
Choose a category (eg. DP) of interest and practice problems on that topic.
- A2 Online Judge (Mixed)
- Problem Classifier (SPOJ)
- UVa Online Judge (Competitive Programming Book)
- Codeforces Tags (DP as an example)
- HackerRank
- Lucky貓的 UVA(ACM)園地 (Chinese)
Calendars for impending programming contests.
Never miss another contest!
- Programming Contest Calendar | HackerRank
- clist.by
- Coding Calendar (Android App)
- Coder's Calendar: Android App, Chrome Extension, Firefox Add-on
- CodeHorizon: iOS App, Android App
These are great sites to ask questions.
It is suggested that you paste your codes at ideone or pastebin.
- Virtual Judge (vjudge)
Virtual Judge (vjudge) allows users to create virtual contests with problems from notable problem archives such as: Codeforces, SPOJ, UVa, POJ, Codechef ... etc.. - BNU Online Judge
BNU Online Judge also allows users to create virtual contests. The interface is quite nice but it isn't as widely used as the previous one (vjudge). - VisuAlgo
VisuAlgo features a large collection of visualization tools for algorithms and data structures. - USA Computing Olympiad (USACO)
USACO contains several training pages on its website which are designed to develop one's skills in programming solutions to difficult and varied algorithmic problems at one's own pace. - The On-Line Encyclopedia of Integer Sequences (OEIS)
A stunning encyclopedia with a database of countless integer sequences. It also features a powerful search engine. Sometimes a seemingly difficult combinatorics problem can be equivalent to a simple or known and studied integer sequence.
Meet the god-like competitive programmers!
Learn helpful tips, tutorials and insights from these people :)
- Codeforces blogs
- Petr Mitrichev (Petr): Algorithms Weekly
- Bruce Merry (bmerry): Entropy always increases
- Przemysław Dębiak (Psyho): Psyho's blog
- Anudeep Nekkanti (anudeep2011): Namespace Anudeep ;)
- vexorian (vexorian): vexorian's blog
- Ashar Fuadi (fushar): Fushar's blog
- LiJie Chen (WJMZBMR): WJMZBMR (Chinese)
- Huang I-Wen (dreamoon): 小月的耍廢日誌 (Chinese)
- Po-Jui Chen (a00012025): code倉庫 (Chinese)
- Shiang-Yun Yang (morris1028): Morris' Blog (Chinese)
- Yuhao Du (TooDifficuIt, TooSimple, xudyh): xudyh (Chinese, Emptied)
- Dreadnought (TankEngineer, rowdark, AngryBacon): Dreadnought's Wiki (Chinese)
- HackerRank Live Youtube
- Petr Mitrichev (Petr): Youtube
- Egor Kulikov (Egor): Youtube
- Adam Bardashevich (subscriber): Youtube
- Bohdan Pryshchenko (I_love_Tanya_Romanova): Twitch, Youtube
- Vladimir Smykalov (enot.1.10): Twitch, Youtube
Visit Competitive Programming - Quora (Top 10 Most Viewed Writers).
Awesome people to follow (Too many people to list, separated by commas and in groups of 3's thus):
Michal Forišek (misof),
Brian Bi (bbi5291),
Jonathan Paulson (jonathanpaulson),
Miguel Oliveira (mogers),
Egor Suvorov (yeputons),
Michal Danilák (Mimino),
Bohdan Pryshchenko (I_love_Tanya_Romanova),
Vladimir Novakovski (vnovakovski),
Nick Wu (xiaowuc1),
Cosmin Negruseri,
Lalit Kundu (darkshadows),
Ashish Kedia (ashish1294),
Johnny Ho (random.johnnyh),
Thanh Trung Nguyen (I_love_Hoang_Yen),
Anudeep Nekkanti (anudeep2011),
Steven Hao (stevenkplus),
Raziman T.V. (razimantv),
Joshua Pan (lonerz).
-
The 'science' of training in competitive programming - Codeforces, by Thanh Trung Nguyen (I_love_Hoang_Yen)
-
If you ask me how to improve your algorithm competition skill, I will give you the link of this blog. - Codeforces, by Huang I-Wen (dreamoon)
-
How can I become good at competitive programming? - Quora
What is the best strategy to improve my skills in competitive programming in 2-3 months? - Quora
What is a good 6 month plan to start and progress through competitive programming? - Quora -
How is competitive programming different from real-life programming? - Quora
To the extent possible under law, Jasmine Chen has waived all copyright and related or neighboring rights to this work.