A Learning Module for Beginners (Currently in Development, Feedback requested)

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

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 :slight_smile: 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

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

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:

Module #3: Sorting algorithms

Module #4: Greedy Algorithms

Module #5: Stacks and Queues

Stack:

Queue:

  • CHFQUEUE (very nice stack and queue related problem, must do)
  • COOK82C (easy-med level problem)

Module #6: Binary Search:

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

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 Introductory tutorials for competitive programming | CodeChef for reading.

26 Likes

A good introduction about competitive programming can be found at

https://unacademy.com/course/getting-started-with-competitive-programming-in-codechef-by-adarsh-singh-gaharwar/XGFOOKYD

@admin AGGRCOW This one is a very beautiful question on binary search!

5 Likes

@admin Really good point, but i sent an email before about TSORT to feedback@codechef.com, not get any reply. I will share my email in here too.

Hi;

Below link can not be opened. If you not fix the issue, can you please delete the link of this question from practice->beginner tab. When i click this link, i see the attached screenshot.

https://github.com/muzir/codechef/blob/master/TSORT.png

1 Like

Module and idea is great! Just sharing my personal experience. The problem i faced is, i was told to sort problem by most solved, and this way easiest problem would come up at top, when i did, it wasn’t like print hello world, it was i really hard problem so i asked someone for help and he suggested me to use another online judge, for beginners section problems difficulty(order) shall be pre-defined on basis of easiest as no one bothers to solve those hello world kind of problems and new comers are the scared and back steps because easiest one usually don’t show up this way.

Another problem i faced is for beginner section problems if possible test cases shall be made visible with algo tags. This would be like providing them a friendly environment and saying hey! we are here to help! Videos for a few problems with link in editorial be provided. There is plenty of strings arrays tutorials on youtube and usually students learn them at college, more important is guidance, content isn’t that big issue in starting as we all know there are many websites and we all either google or youtube! A welcome video about contests, problems link in beginner section or a pop up in beginner section would be great.Though i don’t deny good content is very much necessary! When i started ruspa and the game (or similar) problem was at top of beginner/easy section and after reading i got scared, then sorted them, still a bit hard(least for me) was there

4 Likes

very good!!
@admin please add questions from topics segment trees, lca , sqrt decomposition for the beginners

2 Likes

@admin SUMTRI problem link in Dynamic programming is not working …
Please check it …

1 Like

For learning STL these are good resources
STL Part 1
STL Part 2

@admin INTRN080 problem link in the section ‘Off to Recursion’ is not working. Please check.

this could be added in Module 0

It’ll be better to have a text link rather than video link. Anyways, thanks for providing the link though.

It’s resolved now. Please check.

yes it is, thanks.

@admin @worldunique

Maybe it’s SUMTRIAN and not SUMTRI, add this problem.

okk… typing mistake …
good u corrected it and solved it too

Also, the link for the problem SUMTRIAN leads to the problem TRISQ.