Challenge/bottom questions Long competitions

I always end up solving top 5 questions and don’t know what approach should I take in order to solve the challenge question. Moreover I find that bottom questions of codechef long challenges are easy but requires high level of optimization . How to solve them??? What all algorithms I should know in order to solve them because every time I look at the editorials I always see a new algorithm. How to know about them??? Any help??

First you have to change your mentality. There’s no way you’re going to learn all algorithms, you can learn a lot but you’ll never stop learning. There will always be challenging problems, the only way to get better is to keep practicing. You say you always see a new algorithm reading the editorials. Shouldn’t you start with that? The way you say it it seems like it is a bad thing. Be happy if you see new algorithms, it means you have new things to learn.

There are dozens of posts on competitive programming websites asking how to get better, but most of these people already know the answer, you have to start practicing, don’t wait for other people to throw you knowledge, knowledge doesn’t come to you with magic, you have to go look for it. There are a lot of websites where you can practice. There’s Topcoder, codeforces, codechef, hackerrank, UVA(good place to go if you want to practice on specific algorithms). There are a lot of websites with tutorials, like geekforces, etc, the fact that you post here on codechef means that you have internet access and you can find almost everything online. Of course some algorithms might require mentorship but if you have any doubt you can always post it here, on stackoverflow, there are again dozens of places you can go to. Learn how to google.

You won’t get better just by participating in contests. A lot of people think that just taking part on contests is going to improve things. You may notice improvements at first but only participating during contests is not real practice because during contests you’ll usually only solve problems that you are able to and you’ll just be improving your knowledge on those subjects, even though from time to time you’ll learn new algorithms during contests, don’t just rely on contests for practice.

You say you always end up solving top 5 questions and don’t know what approach you should take in order to solve the challenge question. What have you tried to do to improve that? I mean just by asking this question it means you know what your weaknesses are, why don’t you try to start with that?

You say you find that bottom questions of codechef long challenges are easy but require high level of optimization and you ask how to solve them… You already answered your question before asking it. Learn how to optimize your code, see how others approach those questions. Fortunately most times it’s more about using the right algorithms, if you use the right algorithms and data structures you won’t get much need for optimization, even if you do need high level optimizations starting with the right algorithm is a big step.

Practice, read editorials, read problem explanations, read problem tutorials.




TopCoder Tutorials

Uhunt : (Good problem classification)

You can also use this book to offer some guidance. This is the first edition. The second and third aren’t free.

There are a million more sources you can go to learn.