“How do I Learn to Code?”
This is probably the most nagging question at the back of your mind, once you have decided that you want to learn programming. Like learning anything else, there is no standard process for learning to code. Of course, there are guidelines, there are courses, there are ideologies and there are set traditions, but there is no one single correct way.
The first step is to learn a programming language. We would advise you to learn C++ if possible as it is one of the most common as well as one of the most efficient languages. There are numerous resources available online from where you can learn C++. Some recommended ones are:
- http://www.cplusplus.com/doc/tutorial/
- http://www.tutorialspoint.com/cplusplus/
- http://www.sololearn.com/Course/CPlusPlus/
We recommend using Dev C++ or Code::Blocks as your IDEs (Offline Code Editors).
Here are some blogs to get you started:
- http://codeforces.com/blog/entry/23054#cc
- https://www.hackerearth.com/notes/getting-started-with-the-sport-of-programming/
- http://blog.hackerearth.com/2013/09/competitive-programming-getting-started_11.html
The second step is to practice mathematical and logical questions from various competitive programming websites. This the most important step. You should have practised at least around 50 such questions before moving on to the next step. Some recommended online judges to practice are:
- https://www.codechef.com/problems/school?sort_by=SuccessfulSubmission&sorting_order=desc
- www.spoj.com
- www.hackerrank.com
- www.codeforces.com
We also encourage you to take part in various ongoing contests on these sites to get an experience of contests, especially CodeChef long, Cook-off and Lunchtime contests.
The third step is to learn algorithms, data structures and their applications. You can find a plethora of tutorials online. Some recommended resources are:
- http://www.iarcs.org.in/inoi/online-study-material/index.php – Highly recommended
- http://www.geeksforgeeks.org/fundamentals-of-algorithms/
- http://www.geeksforgeeks.org/data-structures/
- https://www.quora.com/What-are-10-problems-from-SPOJ-and-CodeChef-which-cover-all-topics-for-INOI-preparation
- www.stackexchange.com
Finding great problems to solve: Search in the given format and read the Quora answers.
Topics in order: A good order to proceed in.
Some tutorials to help you understand important concepts:
- Sorting*
- STL One
- Data Structures*
- Binary Search*
- Prime Factorization
- Recursion Part One*
- Recursion Part Two*
- STL Two
- Bits
Here are some links to some problems on specific topics you should be familiar with:
Algebra*
https://www.codechef.com/problems/CODECRCK
https://www.codechef.com/problems/BANROB
Basic Math*
https://www.codechef.com/problems/SETDIFF
https://www.codechef.com/problems/EGBOBRD
Binary Search*
http://www.spoj.com/problems/BSEARCH1/
www.spoj.com/problems/AGGRCOW/
Game Theory
https://www.codechef.com/problems/TUZGMBR
Greedy*
https://www.codechef.com/problems/DONUTS
https://www.codechef.com/problems/GRGUY
Number Theory
https://www.codechef.com/problems/LCKYST
https://www.codechef.com/problems/CHEFLCM
http://www.geeksforgeeks.org/sieve-of-eratosthenes/
http://www.spoj.com/problems/PFACT/
https://www.codechef.com/problems/EGRCAKE
https://www.codechef.com/problems/CBALLS
Dynamic Programming*
https://www.codechef.com/problems/COINS
http://www.spoj.com/problems/FARIDA/
http://www.spoj.com/problems/ACODE/
http://www.spoj.com/problems/WACHOVIA/
http://www.spoj.com/problems/AMR11F/
ZCO Problems – Past years*
http://www.codechef.com/ZCOPRAC/
INOI Problems – Past years
https://www.codechef.com/IOIPRAC
For any queries regarding these questions, feel free to contact:
Sankush Gupta: [email protected]
All this information may seem overwhelming but you don’t need to learn and do everything mentioned in this post. Make sure you try to do as much as you can from the beginning.
Have a nice time coding!