Hi fellow programmers,

We are planning to create a course for beginners. Beginners often come to the site and got overwhelmed by so many problems present on the site. Many of them often ask where to start from. So, we thought of creating a course module for them. The module will be a set of tutorials and a set of practice contests on CodeChef.

For this module, we will identify the key set of topics that a beginner should solve in order to reach a certain level. For each topic, we will have some 5 to 10 or more problems on that topic that she should solve. I have collected some set of problems for following topics (in increasing order of the difficulty). Please feel free to give any relevant feedback, suggest some problems that you think can be added or removed. Any suggestions regarding would be most welcome.

Note that currently, this module is not ready. Itâs still work in progress. I have marked this post a community wiki. Please feel free to edit it.

### Module #0: Whatâs competitive programming?

Competitive Programming is a mind sport where participants solve problems by writing code. The problems in question are typically logical, mathematical or algorithmic in nature. Participants must write code according to given specifications which typically includes a pre-specified time and memory limits within which a program must successfully complete execution.

Two of the most prominent competitive programming competitions are the ACM International Collegiate Programming Competition (ICPC) and the International Olympiad of Informatics (IOI) which are for univeristy and high school students respectively. The ICPC is one of the oldest, largest, hardest and most prestigious programming competitions in the world, and it is widely considered as the âOlympicsâ of programming.

Some other prominent programming competitons are

- Google Code Jam
- Facebook Hackercup
- Topcoder Open (TCO) Algorithm
- Yandex Algorithm

Apart from the above, regular programming competitions are conducted on various platforms across the intetnet. Some of these are

- Codechef
- Codeforces
- Hackerrank
- Topcoder
- Hackerearth
- Atcoder
- CSAcademy

#### Getting started with CodeChef platform

- Solving your first problem in C on CodeChef: https://www.youtube.com/watch?v=qM-TzG3dkcc
- Solving your first problem in C++ on CodeChef

https://www.youtube.com/watch?v=fm7tTWy-H-E - Solving your first problem in Java on CodeChef

https://www.youtube.com/watch?v=gaPdjwuFZTs - Common programming mistakes at Codechef.: https://www.youtube.com/watch?v=VmvGfVadOoU

What sort of errors do you encounter and what they mean? - Must check: https://www.codechef.com/getting-started

### Module #1: Learning A Programming Language

Check https://www.codechef.com/ioi/basics, the section âLanguage Constructs - C++ - 1â for basic knowledge of C++. If you want to learn basics of other languages like Java, Python, you can refer to (need to provide more links).

#### Just get it done Starting questions to do

- FLOW001 (add two numbers)
- FLOW002 (find reminder of a number when divided by other number)
- TEST (one of the starting problem to solve on CodeChef)
- INTEST (for testing whether your input/output routines are fast enough)

#### Basic knowledge of if/else conditions

- FLOW010 (basic knowledge of if/else conditions)
- FLOW014 (another if/else knowledge question)
- LADDU (very nice implementation problem to solve)

#### Dealing with numbers

- FLOW002 (find remainder of a number a % b)
- FLOW004 (find sum of first and last digit of a number)
- FLOW006 (find sum of digits of a number)
- FLOW007 (given a number, reverse it)
- FCTRL (an interesting question, must solve)

#### Basic knowledge of arrays

- LECANDY
- TEMPLELA (contains some interesting corner cases)
- RAINBOWA (basic knowledge of arrays)
- COPS (requires bit of creativity )
- VILTRIBE

#### Working with strings

- NITIKA (reading strings, and string related formatting)
- GOODBAD (ASCII characters, lower-case and uppercase characters)
- FLOW015 (checks basic knowledge of strings and calendar)
- FRGTNLNG (very nice question to test input processing skills)
- LAPIN (check whether a string is a palindrome or not)
- CSUB (good for understanding notion of substrings)

#### Handling floating point numbers

#### Off to recursion

- INTRN080 (Ackermann function)
- NOKIA (a nice question to solve)
- TRISQ (writing recurrence relations and solve them using recursion)
- Another way to implement Ackermann function without stack overflow. Will give people idea of whatâs stackoverflow error.
- SUMTRIAN: See the tutorial at https://www.codechef.com/wiki/recursion-sums-triangle, Its recursion with memoization.

Provide Few More Implementation Problems:

#### Space and time complexity of a program

### Module #2: (Basic Mathematics)

Please see https://www.codechef.com/ioi/basics, Mathematics section for very basic mathematics.

#### Basic Number Theory:

- FLOW016 (find gcd and lcm)
- CATSDOGS
- FCTRL
- FCTRL2 (decimal representation): https://www.codechef.com/wiki/tutorial-small-factorials
- CKISSHUG (exponentiation)
- CHMOD (exponentiation)
- LEVY (sieve)
- NPL1701C (sieve)
- JMAGNUM (sieve)
- KPRIME (sieve)
- CDQU1 (prime sieve)
- CDQU3 (factorization)
- https://www.codechef.com/OCT09/problems/H4/, https://www.codechef.com/wiki/tutorial-just-simple-sum (bit intermediate level)

### Module #3: Sorting algorithms

- TSORT
- MRGSRT (merge sort. Itâs highly recommended that you donât use library and code your own merge sort, quick sort algorithms to test your skills in this problem)
- SIMPSTAT (a very basic sorting problem)
- KOL16J (check whether the array is sorted)
- HORSES (another very simple problem)
- GEEK01 (find median of a given matrix)
- STICKS
- INCPR04
- PERMEXIS (similar question to the above)
- ORDTEAMS (learn how to use comparison function in sorting by having a look at https://www.codechef.com/wiki/using-constructors-and-comparators-c)
- OPTCODE (another problem requiring comparison functions, learning how to use pair<int, int> in C++)
- REL102 (nice simple sorting problem)

### Module #4: Greedy Algorithms

- MAXDIFF (basic greedy problem)
- CHEFST
- TACHSTCK (important to understand proof of the solution, you can learn the trick of how if swap the optimal solution, will the solution get worse only?)
- CDX1604 (sorting with gredy observations)
- STICKS
- MANYCHEF
- KNPSK (interesting version of knapsack problem with weights = 1 or 2)
- CHEFTMA
- TADELIVE (really nice greedy level problem)
- LEMUSIC
- FGS
- LUMPYBUS
- CLETAB (nice greedy problem to do)
- MMPROD

### Module #5: Stacks and Queues

Stack:

- COMPILER
- ONP (reverse polish notation)
- TSECJ104
- THESAV
- TE3N
- BEX
- DCGAME(intermediate)
- HISTOGRA spoj (either we will make its clone on CodeChef or a similar CodeChef problem can be used.)

Queue:

### Module #6: Binary Search:

- FORESTGA (very nice question)
- CHEFHCK2
- SNAKEEAT
- RIGHTTRI
- ASHIGIFT
- SNTEMPLE (much recommended)
- LOWSUM (much recommended)
- SCHEDULE
- kayaks (a must solve question for intermediate level)
- STACKS
- DIVSET (greedy with binary search)
- ELHIDARR (extension of a popular question on interviews. Must solve Question)
- BASE (very nice binary search problem, requires bit of mathematics, must solve)

### Module #7: Basic Dynamic Programming

- ALTARAY (basic dp problem)
- SUMTRI (very nice and basic dp problem)
- DBOY (very nice dp problem, must do)
- XORSUB (basic 2-D dp)
- STRMRG (a variation of standard LCS (longest common subsequence) problem, must do problem)
- GRID (simple 2-D dp, prefix/suffix sums over a 2-D matrix, must do)
- STRSUB (dp with binary search)

### Module #8: Basic Graph Theory

#### Depth first search

- FROGV (can also be done without requiring dfs by making some simple observations, in fact, dfs is overkill for it)
- FIRESC (must do dfs problem, can also be done using union-find algorithm)
- CHFNFRN (check whether a graph is bipartite)
- FRIEMEET
- DIVIDE (binary search with bipartite checking type logic)
- MCO16104 (consider the inverse graph)
- AUEC (existence of euler circuit in a graph)

#### Breadth first search

- CHFNFRN (check whether a graph is bipartite)
- DIGJUMP (a great problem with one of the great editorials)
- SNGRAPH (a tricky bfs)
- SNSOCIAL
- CHEFARC
- MCO16104 (can also be solved using bfs)
- L56LABY

#### Union Find

- BIGOF01 (very basic problem on union find, must do)
- COLGQU (slight harder version on union find)
- DISHOWN
- CHFNFRN (check whether a graph is bipartite)
- MTRWY (slight harder version on union find)
- JABO
- FILLMTR (very nice problem on union find, intermediate level, you may also check the video tutorials)
- GALACTIK (a very nice union find problem)
- PARITREE (intermediate level problem)
- SETELE (much recommended problem)
- MAGICSTR (recommended only for intermediate+ level)

### Advanced features of languages

Check Language Constructs. Itâs good to learn Standard Template Library (STL) - C++ 2 section in https://www.codechef.com/ioi/basics for reading.