Stalled progress in C.P.

I feel like I am not making any further progress in competitive programming.

I attempt Long challenge here on Codechef. I can solve 3-4 questions every time(completely or partially). But nothing after that. Long challenges keep on coming and I repeatedly solve only those 3-4 questions.

It is like an infinite loop. Solve those questions. Cannot solve remaining ones. Contest over. Repeat the same thing in the next one.

No progress.

How can I break the shackles and solve the remaining questions?

I believe everyone has faced this problem at some point. So how did you get out of it?

Feel free to share your experience.

6 Likes

Till what topics do you know?

A reason to participate in contest is to see which topics we need to focus on. Did you check the editorials? The pre-requisites? Have you covered them all?

After 3-4 questions, usually you will need to know some data structures like trees to show progress. Then, some questions require graph theory. Are you well versed in them? If no, then whats keeping you from starting them? If you feel books are a burden, have a check from online sources like geeksforgeeks , or somewhere else.

I am also kind of in your shoes, trying to learn trees (honestly…summer vacations…going like “Just 5 min more sleep and then i will do it.” Lol. Damn laziness XD)

I will be able to help better if you can provide me a bit more information on your current status.

1 Like

I feel you, i was only able to solve 1 question in feb17 long challenge and thought maybe this isn’t meant for me. But i stuck around and practiced anyways.

So i am going to list some things that worked for me:

  1. Code Monk - Be a better programmer
  2. Easier challenges on Hackerearth to boost up my confidence
  3. virtual contests on http://codeforces.com/
  4. Tushar Roy - Coding Made Simple - YouTube
  5. Quora, reading about how other people struggled and still succeeded.
  6. This video by Anudeep Nekkanti , he talks about how to stay motivated and keep learning

Also just because you learned a topic doesn’t mean you will be able to implement it right away. I learned segment trees in like 3rd week of April, and i only was able to actually apply it few days ago. Just keep at it, your skill will skyrocket one day.

10 Likes

Yes, learn trees and graphs. Doing 3-4 questions before learning them means you are well saturated (and well versed) with whatever you learnt till now.

Knew what was the basic idea of that algorithm was. But just couldn't implement it. Couldn't understand it well enough

It happens. Graph theory, my personal opinion, is very tough. Had it been so easy that you could do it all in a day, then there wont be many Q on graph.

Sometimes even i look up for new algorithms during contest. Its always hard time implementing them on your own, leave alone, modify and optimize them to submit for a contest.

And I know the basics of segment trees, dp and have solved almost all the questions from the beginner section here on codechef.

Beginner section…to be honest is nothing hard or nothing which would lead to a wall-breaking result.

Try the easy section problems. Some of them are quite decent and require tricks to solve. Then proceed to medium.

But again, time is short. Try to focus on what you need CURRENTLY. Codechef doesnt classify problems based on topics. Either you go and practice them from other sites like hackerrank.com , or selectively solve questions based on the topic you need.

To be honest, i always feel that “Trees is so complicated wtf is this”. But one of my seniors said that its the easiest thing i will see. Its all about getting used to it.

In the end its all about practice. When i was new to cp i thought string is hell. Now the case is different.

Now how to go further from this? How to make the next jump?

Well, i am trying learning stuff from “Introduction to Algorithm” from Thomas Cornell (you will ahve to deal with this book in 2nd year of CS anyway), so i can start from basics. But since you said that you know the basic stuff (which i take in as, you can write simple/easy programs related to them), then all you need is good practice.

I know it sounds easy to say “Practice”, but there are many things in way. Biggest being, stuck on a question for hours and hours and hours. Its frustrating. Some questions of previous long took me one and half day to solve for full score.

To make process easy, a study group or peer group is recommended. Somewhere where you can ask doubts from problems, people who give HINTS on solving the problem instead of solution. People who are willing to debug your code to get your mistake, when you fail to do so.

The biggest devil you will face is time constraint. Even in vacations, refrain from wasting time. Try to wake up early- The time in morning is all yours! Once college starts, you will have to sincerely solve atleast 2 problems a day (if easy-medium.), or devote some time to CP.

I want to know, you said you werent able to implement Dijkstra’s Algorithm then. Whats its status now? Did you try getting back at it? Or did you face a problem there?

Its only by analyzing yourself, that you will be able to clear the choke points which are stalling you!

2 Likes

even if i run my code on O(n) ,where n<=100000. it shows TLE (1.01). why can anybody explain?I asked this question here as codechef didnt allow me to ask this on main page(1 karma point only).please help.

1 Like

I think https://codefights.com/ is a very good place to practice. There are so many practice modes you can test your skills. You can challenge with strangers, bots, you can view interview questions of companies. You can join tournaments etc. I think you should check it

Hi I want share my experience to u…I was also in a same position like you still 2 months before then I started actually started learning this concept…It helped me a lot in solving problems…
As a result I solved I solved 6 problems fully and 2 problems partially in may
and in june I solved 5 problems fully and 3 problems partially…

->Go throught standard graphical algorithm problems…In most of the contests I have participated there is one such problem belongs to that.

->Go through concepts of segment trees,tries related problems there will be definitely in most of contests will have

->Go through partial game problems i.e Sparge graundy theorem related…

If u start learning in this direction it will help a better way…Happy coding :slight_smile: …Dont giveup

2 Likes

Frankly I don’t know graphs and trees completely. But will learn them soon(Well before August I think, before the summer vacations end :wink: ).

For instance, there was a question in May Long, which was based on graphs. I knew it would be solved by Dijkstra’s algorithm (I had heard of this before).

So tried to read about it from different sources.

Knew what was the basic idea of that algorithm was. But just couldn’t implement it. Couldn’t understand it well enough.

So everyone who knows it, just wanted to know how did they jump from “not knowing stuff” to “well versed with it”.

And I know the basics of segment trees, dp and have solved almost all the questions from the beginner section here on codechef.

Now how to go further from this? How to make the next jump?

That’s some serious progress man. From feb17 to here. Congratulations for it!!

And will follow those links.

So should I leave the challenges for sometime and just learn stuff (for 1.5 months)??

And then get back to challenges and practice whatever I learnt.

Is this the right thing to do??

Don’t leave challenges, just don’t think about how you perform in them. Simply solve to solve, not to get some rank. try this as well USACO Training Gateway .

Also, make a group of friends/classmates who are interested in CP, solve their doubts. you will remember it for life if you are able to teach a thing to someone else.

1 Like

Thanks a lot for so much help. Keeping whatever your said in mind, I will get back to practicing stuff. Stuff which I am not sure about and stuff which I don’t know. :slight_smile:

Man you study in DTU, you cracked JEE(i couldn’t even qualify). Da hell is CP? XD. Just be confident, you will be great in no time!

1 Like

JEE and CP are two different things man. I am in first year, so that’s the problem. But practice is the key. XDD

And you didn’t qualify jee. Who cares? Everyone who clears it, isn’t ready to help and frankly I don’t look upto everyone who has cleared it after all.

I hope you get what I am trying to say here. :wink:

I agree with most of your answer! BTW, what are your thoughts about hackerrank> I think its contest and problems are best for motivation due to 100% partial marking. (I mean, even if your 1 hour optimisation gets only 1-2 more test cases correct out of 15, its a different joy that something worked. In codechef i just see rows and heaps of TLE all the time XD)

Hackerrank has great problems and editorials. But it lets you see where exactly you are going wrong( like you can see the test cases for practice problems),i so many times fooled the judge by guessing what the test data is in contests, rather than getting the correct solution i was trying to get that green tick no matter what. So i quit hackerrank, but that was me obsessed with getting good ranks to show off among my friends. I feel i changed my presepective since then.

Thanks a lot for the help. You always help me clear my doubts. :slight_smile:

Vijju is the superstar of codechef forums, always helping others. Love him for it :slight_smile:

You can ask your questions here :

https://discuss.codechef.com/questions/97820/i-want-to-ask-a-question-ask-them-all-here

And this can be because the number of test cases is large (say 10^5).

It adds upto 10^10. This results in TLE. May be it expects a O(1) or O(lgn) solution.