DEV Community

loading...

How to prepare for a competitive programming contest

alinp25 profile image Alin Pisica ・2 min read

What is this about?

Tomorrow in the morning I'll have a regional programming contest, where I'm at my 4th participation. Overall, I got into the competitive programming area like 4 years ago and I think I learned some tricks that might help you with getting rid of panic and stress.

What is a competitive programming contest?

You receive few algorithmic problems and you are required to solve them as efficient and optimized you can, considering the limit times and memory given to you.

Now, here comes the fun part:

1. If it's a given theme, focus on it, but don't forget the others

If the contest is based on some "ideas" or only on some data structures or algorithms (for example, all of the problems are graph-related), try to focus on it but never, absolutely never, don't forget the other ones. You don't know when you have an opportunity to use something that you wouldn't expect to.

2. Don't stress yourself

Even if it's a contest, it is not meant to make you stressed. Before, while it happens and even after it you have to be as chilled as you can, and try not to get make yourself some problems when they shouldn't be here.

3. One day before, don't touch algorithms

Don't. Just don't. You will keep your eyes and mind focused more than ever on the things you do the day before, and it might screw you up. Do anything else, take a walk, read a book, just don't touch the algorithms or problems. Maybe for some of you, this might be helpful, but for the big majority, this ain't helping at all.

4. Split the problem

A lot of competitive challenges, come with a very big description, that might get you scared. Get a pen and a paper, read a phrase and shortly remove the unnecessary words and try to translate them into a more "understandable" logic
For this, I recommend all the tutorials from TopCoder.

5. Don't miss the fun

Even if it's a contest, it is a great opportunity to meet new people with same passions like you. Don't forget to talk, socialize and have fun (and yes, even problems are fun).

In the end, I can tell you this: stay focused but don't go obsessed with it. Take your time and even if you don't get it the first time, keep working and everything will come to the expected end. Until next time, good luck and happy coding!

Discussion (0)

pic
Editor guide