Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do people solve programming competitions so fast? [closed]

Tags:

coding-style

I hope this is not a vague/broad/subjective question. If it is, please close it.

Anyway, at several programming competitions (like Google's Code Jam, Facebook's Hacker Cup and so on), by the time I've successfully understood a problem and have an inkling of how to approach it, I see that half the questions are already solved by many people.

My question is, how do these people get so good? Is it pure genius? Is it experience? Is it the ability to think really fast? How would you suggest I improve my skills? I would say I'm a competent programmer. I can eventually solve some of those questions.

Additionally, whenever I inspect the code of winners, I see a LOT of macros being used. This implies to me that they sort of have a template (like #define for loops to some abbreviated version) which they use to program faster. Does this make a significant difference?

like image 680
Anish Ramaswamy Avatar asked Mar 06 '13 08:03

Anish Ramaswamy


2 Answers

The thing is, you're competing against people who've spent massive amounts of time mastering their skill to compete in these competitions. You're unlikely to catch up any time soon, but...

How do these people get so good?

Have the theoretical knowledge to solve the problems and practice, practice, practice.

Is it pure genius?

It can be, but practice can to a reasonable extent make up for it.

Is it experience?

Yes.

Is it the ability to think really fast?

Not really. Practice allows you to approach the problem correctly and skip insignificant details in the problem statement.

How would you suggest I improve my skills?

Get the theoretical knowledge and practice.

Do macros make a significant difference?

It may cut 10% off of your time, but probably not much more.

like image 152
Bernhard Barker Avatar answered Jan 23 '23 08:01

Bernhard Barker


Statistically speaking, any programming competition with a large enough audience will attract super-talents who can churn out nice and elegant code at super-speed. It's like running the marathon. Running it in 4 hours is really good, even if the world record is around 2 hours. Don't worry about it.

Focus on code quality and elegance instead, instead of being able to churn out code at super-speed. Practise, have fun, and don't look too much at how fast other people are working.

like image 29
JesperE Avatar answered Jan 23 '23 06:01

JesperE