DEV Community

soroush
soroush

Posted on

how to master competitive programming?

Hi folks , i tried a couple of things to learn algorithm and data structure and then apply them into hackerRank or leetcode .etc .
But there is a problem i overhelmed from many exsting many resources and advices , first of all please help me to find good reaource to learn algorithm and data structure and finally help me how I can master at competitive programming challenges like HackerRank or leetcode ? How can I apply an algorithm to those challenges?

Top comments (2)

Collapse
 
pankajtanwarbanna profile image
Pankaj Tanwar

I think -

  1. Open hackerearth
  2. Solve only easy algorithm problem
  3. Open atcoder
  4. Solve A B C problems of all previous beginner contest
  5. Open Codeforces
  6. Sort problems in descending order of submission and solve 200 problems ( Keep participating in contest )

At this stage you will find your solving easy problems with 5-15 min and mediums in 30-40 mins.

Now learn more algorithms solve topic wise medium and easy problems at LeetCode.

Switch to advance topics as dp graph tree etc.

Keep practicing.

I may not be accurate but I follow this strategy

Collapse
 
kolaveridi profile image
satyajeet kumar jha • Edited

hey ,
If you plan to learn algorithms and data structures just for interview , i would recommend you to start learning in a topic wise manner and solve problems related to that algo or ds on leetcode .If you don't understand , try looking for how others solved it by watching video tutorials . It is slightly time taking process if you are a noob but this can be done and not so hard.
Cp in general is hard .It's a full time activity so be ready to spend 4-6 hours on a daily basis ifyou can't spend your whole day. Don't learn topic wise instead try solving a problem and if you can't , go through it's editorial and learn the required algorithms and then try going through the editorial again to solve it . It's a time consuming activity and you may or may not show great progress .Again , if you don't enjoy this you won't be able to do it for a longer period say two years or three years.