Complete noob: How to approach this contest?


I have no background in data structures and algorithms. I have done a minimal amount of coding and am aware of syntax for Python. I have been struggling to solve questions and have followed the following strategy:

  1. Read the problem statement.
  2. Spend a significant amount of time working on a solution.
  3. Come up with the solution that passes all the sample test cases but usually gives the WA.
  4. Spend a significant amount of time reading editorials, discussions on CodeChef blog, and trying to debug my code.
  5. Usually, after this step, I either come up with a correct solution or I just look at the solution given in the editorial.

This amounts to spending anywhere between 3 to 6 hours on a problem. I think I can do better. I was wondering should I read a book or follow a course online to increase my understanding of concepts and increase my efficiency as well. I had two courses in mind:

  1. Introduction to Algorithms by MIT OCW.
  2. Data Structures and Algorithms by IIT Delhi NPTEL.

Any ideas which course is a better one?
Any ideas if there is a book that I can follow?

I was thinking on even days of the month, I’ll code, and on the odd days, I’ll watch conceptual videos. Does this approach make sense?
Any other suggestions are also welcome.


My approach:

  1. Pick a topic

  2. Solve as many questions as possible until you don’t feel confident about the topic.

  3. Take part in contests.

  4. Upsolve the questions you couldn’t solve during the contest.

  5. Repeat…


Firstly, complete a large number of practice problems.
View solutions for any tough ones and try to learn how and why specific functions have been used
Do not simply copy-paste solutions( at least until you completely understand the how and why of it)
doing a dry run of your code helps. try to debug the code yourself
keep at it! :slight_smile:

1 Like

Thank you for these great suggestions, I’ll incorporate them as I move along.

1 Like

I was not aware of this “Topics” link, amazing compilation of concepts and relevant resources. Thank you very much.

1 Like

6006 by MIT OCW is one of the best resource for Algorithms and Data Structures. I personally started my journey with this course :slight_smile: . Just start with the course and follow it strictly along with the assignments mentioned during the course. Also, as the solutions to those assignments are in Python, it will be an advantage for you.

1 Like

Glad it helped! :+1: :slightly_smiling_face:

1 Like

Thank you for your reply. I am planning to do the same. :slightly_smiling_face:

Check this out

1 Like

Sure, let’s start from today. :slightly_smiling_face:


1 Like


1 Like