CP Roadmap - Google Docs
CP Roadmap - Google Docs
INTRODUCTION:
➡️What is CP?
I t's a mind-sport where you are given a problem and have to develop optimised
solutions for the given constraints with your coding skills. This helps us in
building our logical and analytical thinking skills and also in enhancing our
knowledge.
Now, the question is how we can do Competitive Programming.
\
W hat’s better than some advice from the bestto get started?
● How to start Competitive Programming? For beginners!
● How To Become Red Coder? (codeforces.com)
➡️Pre-Requisites -
W hat text editor or IDE should I use for competitive programming?
ome of you may have thought about which editor to be used for competitive
S
programming. Well, some of the good editors for CP are Sublime Text (for both Linux
and Windows), CodeBlocks (for Windows only), and Geany. However, if someone still
uses online editors (GeeksForGeeks, Codeforces, Ideone, or CodeChef IDE), switch to
offline editors as soon as possible. Online editors should not be used during the contests
because the site may crash at that time, and you may lose the unsaved code. Also, if you
are using Ideone or Pastebin, your code may get stolen, and you might be caught in
plagiarism.
ow talking about the offline editors, if you have Linux installed on your laptop, you
N
can easily set up Sublime Text on it. (InstallingSublime Text on Linux,Set Up Sublime
Text in Linux). However, if you are using Windows,try setting up Sublime Text
(S
ublime Text for Windows). However, if it is givingany errors which you are not ableto
resolve, then you can set up CodeBlocks easily on your system. You can also set up
Geany on your Linux system if you want.
( Linux setup for Competitive Programming (with Geany) )
➡️Week I -
✧ So, in the first week, we will start with the most essential things required for
CP, which areLearning a LanguageandUnderstandingTime and Space
omplexity.
C
✧ On the language part, we would be learning C++ because it’s the most
commonly used language in CP for two main reasons:a.It’sfaster than any other
p rogramming languagein terms of speed,andb.Ithas a veryvast Standard Template
Library(which we are going to cover in the upcomingweeks)
✧BREAKDOWN -
Introduction to C++ -
- Basic Syntax and Structure
- Input/Output in C++
- Comments in C++
Conditionals in C++ -
- If-Else Statements
- Switch-Case Statements
- Ternary Operator(Substitute for if-else)
Loops in C++ -
- W hile and do-While Loops
- For Loop
- BreakandContinuestatements
Arrays in C++ -
- Introduction to Arrays
- Multidimensional Arrays
Strings in C++ -
- C-Style and C++-Style Strings
- More with string Object in C++
Functions in C++ -
- How to create Functions?
- Default Arguments in a Function
- Passing Array to a Function in C++
- Call by Value v/s Call by Reference
Recursion -
- Introduction to Recursion in C++
- Recursion and Backtracking
Practice Time !!
- h ttps://www.codechef.com/problems/FIBXOR01
- https://www.geeksforgeeks.org/partition-set-k-subsets-equ
al-sum/
- https://www.geeksforgeeks.org/given-a-string-print-all-pos
sible-palindromic-partition/
Day VI n Day-VI, we will discuss the Big-O Notation and its
O
relation to the CP scenario. We will get an overview of the
classification and an overview of how to judge the time
complexity of an intended solution using the constraints
of a problem.
- Introduction to Time Complexity
- Big O Notation
- Judging Constraints
✧ Some Extra Topics for Week I - (Depends on your interest :)
- Structs in C/C++
- Linked List and its Implementation
- Object Oriented Programming (OOPS) in C++
- Common Errors in C++
➡️Week II -
✧ We are going to coverC++’s Standard Template Libraryor STL in the upcoming
two weeks (Week II and III).
✧ Since STL has a lot of functions and predefineddata structures in STL, it can be
verwhelming to go through every one of them. So we will be covering only some of the
o
most useful data structures in STL that you are most likely to encounter during your CP
journey.
✧ BREAKDOWN -
Day I I terators -
They are very similar to pointers in various ways, it might
be a little tricky to fully understand without any prior
knowledge of STL containers.
But try to read about them from thisblog.
To iterate over Different containers using aRange-based
for loop in C++ provides a sleek syntax.
ambda expression -
L
You can read about it fromLambda expression in C++-
GeeksforGeeks.
These are useful when you want to write custom
comparator functions.
air -
P
Pair is a relatively simple container, defined in STL, it is
used when we want to store two data together.
Give it a read from thisblog.
Day I ueue -
Q
Queue is a type of container adapter that operates in a first in
first out (FIFO) type of arrangement.
More about the queuehereand in thisblog.
ow, that you know a lot of stuff so you are a lot more likely
N
to make a lot of mistakes so here is a video that would be of
great help
C++ Mistakes Noobs Make (and how to prevent them)
y now you are well familiar with C++ STL, so you will be
B
better able to appreciate this blog and use it:C++tips and
tricks - Codeforces.
➡️Week IV -
✧
So, in the fourth week, we will be covering some miscellaneous topics that are
very much essential as you proceed higher up in the domain of Competitive
Programming.
✧ The topics include - Prefix Sums, Number Theory, Dynamic Programming
and Bit Masking.
✧ This section is more about practice, the content would be very minimal, but you
can improve your grip on these topics by practising more and more…
✧BREAKDOWN -
➡️Week V -
✧
So, in the five week, we will be covering some advanced data structures topics
that are very much essential as you proceed higher up in the domain of
Competitive Programming.
✧ The topics include - Basic Graph Theory, Trees and Segment Trees.
✧ This section is more about learning , there week will be containing heavy
learning, but you can improve your grip on these topics by practising more and
more…
✧BREAKDOWN -
- W illiam Fiset
- Reducible
Practice Time !!
- ttps://atcoder.jp/contests/abc315/tasks/abc315_e
h
- https://codeforces.com/problemset/problem/1843/D
- https://codeforces.com/problemset/problem/1830/A
- https://codeforces.com/problemset/problem/1143/C
Contributors -
● Sanat Goel | 9779589799
● Vipul Chanchlani | 9462150839
● Goutam Das | 9827708951
● Rishi Agarwal | 7071377085
● Varun Tokas | 9990825216
● Shivam Mishra | 8604397668
● Chayan Kumawat | 9569426190
● Prerak Agarwal | 8528203343
● Sankul | 9315719561