Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
1 like 0 dislike
8,002 views
in Competitive-Programming by | 8,002 views

8 Answers

0 like 0 dislike
Best answer
Follow this pdf to master competitive programming step y step : https://drive.google.com/file/d/1J2x8pIYQ3MXANgvzOgBciWd3d79j_Exa/view
by Expert (109,130 points)
0 like 0 dislike
Do practice in problemset tab and participate regularly in cf rounds
by
0 like 0 dislike

1. Get thorough understanding
First of all study all the concepts of the programming language deeply. Always use standard books. Today many online platforms are available where geeks from all around the world share their knowledge and try to make the concepts easier. One such platform is “geeksforgeeks” where you can find some of the most useful articles.

2. Follow a hierarchical approach
Try to start coding using simpler problems. Before directly writing the code, first make a flowchart of the logic being used. This will increase the number of correct codes which will not only sharpen your skills but also boost up your confidence.

3. Implementation in real life
Once you get used to with the codes and the basic programming try to make codes that solve your daily life problems. These may include report card of any student, ticket reservation system, library management system, etc. They will make you feel like a software developer.

 

 

 

4. Truncate the code
Now the next step is shortening the code. Suppose you make a simple code for library management system. Now try to abbreviate it such that the same task can be accomplished in a much simpler and shorter way. You can first just see the problem and make your own code. Now see the optimal solution to learn how it can be reduced. This is the most important and the transition phase from basic programming to competitive programming.

5. Be a fighter
Now start participating in coding competitions. The competitions may be in your school, online or at national level. Here you will find guys like you competing and beating each other. Here, you have to write the optimal solution and that too within the shortest time possible. Obviously, since it’s a competition so it’s survival of the fittest. Such a healthy competitive environment makes the learning rate faster and involves learn by fun mechanism. Apart from this you will also get a rating according your successful submissions of the code and the competitions you win which strengthens your professional profile.

6. Start spreading the “GYAN”
Once you become a code-keeda, don’t keep your knowledge to yourself. Spread it. Share it with your juniors, your peers and through the world. There is a popular proverb that says, “gyan baantne se badhta hai” – “Your knowledge increases more if you share it with others “

7. Be updated
“Success is not a destination you arrive at, it is a manner of living.” So, always be updated of the new technologies and the new amendments in the field of coding. It will help you produce better and serve better.
Thus following the above sapt-karma (seven steps) you can surely become a master in competitive programming and can serve the society in a much better and a much advanced way. And believe me guys when you see the power of these codes in real world applications, that is, when you see robots working on the commands you write, trains moving as per your codes, a nation’s defence mechanism being secured by your codes, it feels like heaven. So go ahead guys, be a programmer and contribute in making India a Digital India, and the whole world the Digital World.

by
1 like 0 dislike

Many people tell you that solving lots of problems and you will become red on Topcoder/Codeforces one day. It is true, and is the only universally approved way in competitive programming community, but it is actually just half of the story. Let me first explain to you the `science` of problem solving (which is not very scientific, since it was only developed by myself).

For each problem, in order to solve it, you must jump over a gap. It can be either a difficult implementation, or some hard-to-see observation, difficult algorithm, etc.

image

For me, some problems are very easy (e.g. Codeforces div 2 A, B..), because those gaps seem so small to me, and passing through them feel just like casual walking.

image

Some problems are very hard. The gap is just too huge, or there are many many gaps, and you can get stuck in the middle because you're too tired after maybe first gap.

image

Using this science, we can explain a lot of phenomenon in the competitive programming world:

  • Some guys learn very fast, got to div 1 in Topcoder/Codeforces only after like a couple of weeks since he started programming. Some people are born with high jumping ability (problem solving skill). They can jump over average gaps easily.
  • The more you train, the better you become: Of course, if you jump around all day, you must be somewhat better at jumping through gaps, and thus being able to solve more difficult problems in less time, since you don't need lots of mental preparation or warm up excercise before jumping.

But.. it also means that, if you just solve too easy problems, you can still only walk through small gaps. You may walk through gaps faster, but you are still unable to jump.

So yes, the best strategy to improve your competitive programming skill is to practice a lot, but you must solve gradually harder problems, not just the easy ones. Get out of your comfort zone and challenge yourself. For example, if you solve problems on Codeforces:

  • Sort by number of people who solved it.
  • Start with page 1
  • Solve some problems. If you feel you can solve them in like 5-10 mins, immediately ignore the other problems, move on to page 2
  • Continue until you feel challenged (e.g. need like an hour to solve / can not solve at all / ...).
  • Try really hard, but if you fail, look at editorial, ask for solutions, ...
by
0 like 0 dislike
REALLY HELPFUL : Practice on virtual contests and make yourself an excel sheet to monitor your time of reading, thinking, writing the code and debugging the code, also, make a docs sheet on google and make a table to define each problem you solved with it link and tag and what you learned from this problem whether you solved it or looked in the editorial, there is a problem that was repeated in a recent educational round which was presented in a former div before, another reason is because you will use those tricks as you progress.

Hope this is useful :)
by
1 like 0 dislike

Step-1: Find your motivation for getting started with cp(competitive programming).You need that fire in you. It can be the adrenaline rush of solving the problems,high ratings and good ranks,getting good at coding interviews,improving your resume,increasing your chances to get selected at a good company,etc.

Step-2: Make sure you are thorough with your programming basics. You need to be very thorough with : -

1)Conditional Statements.

2)Loops.

3)Arrays.

4)Strings.

You should be able to manipulate and mix up these concepts.

To improve upon these, practice all problems and learn theory from here :-

1)Decision Making Statement

2)C++ Programs | Basic C++ Programs

3)If Statement in C++

4)If Else Statement in C++

5)Switch Case in C++

6)Control Flow Statement

7)While Loop in C++

8)For Loop in C++ — C++ Tutorial

9)Do While Loop in C++

Youtube Channels :-

1)easytuts4you

2)C++ by Saurabh Shukla Sir

3)

(English)

Now, only if you’re confident with your basics,then move ahead.

Step-3 : Try to stick to C++

Step-4: Go to hackerrank and solve first 50 problem from this list :-

Solve Algorithms Code Challenges

You can always look at the solution,other’s code and discussion if you ever get stuck.

Step-5:

Learn about hashing techniques and various STL(s) in C++ from geeksforgeeks website.

Link : https://www.geeksforgeeks.org/the-c-standard-template-library-stl/

 

Spend 3–4 months here, all you need to do in this period is solve implementation problems, normal optimization problems, all you gotta do is use loops,conditions,arrays and basic arithmetic in this period. Nothing more, nothing less! Don’t solve any problem which involves advanced topics like graphs,advanced-math,trees,etc.

Most important thing is to be motivated all the time during this period. You’ll face the highest kind of resistance here. Only focus on problems and solutions, not on other coders,their ratings and performances, its a complete waste of time! Learn this secret trick!

You have to train yourself to find solutions to algorithmic problems in this time frame, practice problems from here :->

Link:- https://codeforces.com/problemset?tags=greedy,combine-tags-by-or,implementation,1000-1200

2)Search Long Challenge on Codechef and solve first 2 problems of every month from Feb-2018 to September-2019.

3)Search Cookoff/Lunchtime on Codechef and solve first 2 problems of every month from Feb-2018 to September-2019.

4)Everytime you find some new concept, save it in your diary and your brain ;)

5)Go to Hackerearth website and solve all problems under basic programming tab from here :- Basics of Input/Output Practice Problems Basic Programming | HackerEarth

(Start with very easy!)

6)Solve from here : — subarray Archives — GeeksforGeeks

Strings Archives — GeeksforGeeks

When you feel tuned in with competitive programming , start participating in : 

1)Cookoff/Lunchtime.

2)ABCs of AtCoder

3)Codeforces Div-2

4)Never participate in Long Challenges, it slows down your progress if you are a beginner ,also close to 60% solutions are plagiarised in Long,it involves high amount of cheating , hence you will never know where you stand and most probably you will enter the wrong route.  

When you reach cyan on codeforces OR 4* on Codechef, you can assume that you are past the beginner level and the next step is : https://www.desiqna.in/219/best-free-resources-for-competitive-programming

by
0 0
Hi...
I really liked this roadmap of yours.
Actually i have a doubt that in step 5 point no. 2 ,u have told to solve long challenges of codechef from feb 2018 to september 2019......so why the questions from this specific duration?
0 like 0 dislike

In order to improve, you must find your own weakness and try to improve from that.

Each person has different weakness, and it would be pointless for me to write some generic answer, like keep practicing, keep studying algorithm... Only you can change yourself. Try solve problems & keep track of what you don't know & why can't you solve a problem. Following are something that you can keep in my while trying to find your weak points:

 

  • Do you not know some algorithm?
  • Do you know the algorithm but cannot implement it in time?
  • Do you know the algorithm, have rough idea of how to solve, but cannot figure out the details (e.g. can't find some formula, can't find simple way to implement...)
  • Do you know all the necessary algorithm / implementation skills but cannot solve problem? Maybe you lack problem solving skills
by
0 like 0 dislike

If you rating is steadily going down, doesn't mean you haven't been improving; it just means relative to others you haven't been doing as well. So don't give up hope just yet. Here's a quick rundown on how to get better at coding, which will eventually turn into an increase in rating.

#1 Start off simpler. Try out USACO training pages if you code in C++. Or if you don't you can use the CodeChef beginner track: beginner | CodeChef or the CodeForces sorted Problem Set: Problemset - Codeforces

#2 Read about algorithms. Such a vague statement, so here's a little list of algorithms that are used in competitive coding: Data Structures and Algorithms Here is another link to find lists of algorithms: What are the algorithms required to solve all problems (using C++) in any competitive coding contest?

  • Obviously, this does not cover everything. Reading CLRS algorithm book will also be really nice.
  • You will see that reading about algorithms is kind of like supply and demand. The more problems you do, the more algorithms you've got to study up on.
  • Programming Camp Syllabus

#3 Practice, practice, practice. This should be simultaneously done with #2. Never just do #2 or #3; this will not help you. You need to implement AND learn how the algorithm works, so that you are able to tweak it however you want.

  • There are so many online coding platforms: What are the various online programming contests?
  • Here are the ones I would say to focus on:
    • CodeForces: ability to look at other people's solutions, weekly contests, no shortage of problems, most problems have editorials
    • HackerRank: similar to CodeForces, able to look at other people's solutions, most problems have editorials
    • USACO Training Pages: goes over basic algorithms in succession with applicable problems to help implement
    • USACO Past Problems: good for training for the USACO contest (perfect for US high school students and below)
    • Others: HackerEarth, TopCoder, SPOJ*, CodeChef*, online judges*
    • *solutions and editorials are rare in these cases, you will have to google search or ask questions

#4 Don't stop even if you get stuck. Get help immediately. Do one or multiple of the following:

  • Try find other people's solutions or read the editorial. Get the main idea of the solution. Now CLOSE the solution and implement your without reading the solution again. This is quite important, so that the algorithm/solution will sink into your head.
  • All coding problems have patterns. You will always see similar problems all the time. Thus, strategies and algorithms you used will also pass over. Remember keywords that strike an algorithm. This will play a big role in your success as a competitive coder.

#5 Do contests. There is no better practice than actual contests. Contests help with your ability to contain your stress and will test your strengths to the maximum. After each contest, make sure to solve all the questions that you did not solve during the contest. This is a major key.

  • Your rating doesn't matter. Once you put your rating to a side, you'll be more aggressive in solving, not worrying about your rating :)

#6 Have fun. You really can't be good at something if you don't like it. So have fun! Good luck!

by