Algorithm competitions have secured their name-space in programming fraternity today. They have gathered attention of some of the most brilliant minds across the computing era. And they have set quite a few benchmarks. I am talking about the likes of TopCoder, Codechef and now emerging tid-bits like Interviewstreet. Even CSE, IIT Kharagpur is going to hold Bitwise, it’s annual Programming Competition. The variety of people participating ranges from professionals to students currently in sophomore to school kids! Such has been the craze. Besides running such competition needs least of human and capital investment. Take for example Codechef, which is a Directi initiative, and if you ask any Indian student he might know what Codechef is — but he might meek idea of what Directi does
.
I would today discuss about why Indians, and students from IIT’s fare badly in such competitions. The first question to ask is, what does it take to really do well in such competitions ? As any other preparation this is an organized effort which requires:
- Penchant for algorithms, and a will to solve new as well as complex problems
- Basic grounding in standard algorithms, which are used as subroutines to most problems
- Exposure with loads of solved problems
- An armor of implementation techniques, mostly learnt through practice
I think the issue which requires most effort and concentration is “practice”. Programming is more or less like Math, the more you practice — patterns start to flow, techniques start to apply themselves and you become quicker by the day
. I think this streamlined approach is missing for most Indian collegiates who have tried and frustrated at hands of such extreme competition! Take for example a typical coding competition lasting say, 2.5 hrs and asked to solve 3 problems of varying difficulty. How does an experienced competitor moves in such short time ?
- Identify which problem is simplest and go for it, take about 20 mins to wrap it up (it’s difficult believe me!)
- Identify the second problem and try to work out a doable and fast enough solution. Generally requires advanced math or graph theory etc
- The third question will be *tough* and even if the approach is known, the implementation will be quite difficult
Easier said than done. Following above steps takes extreme practice and regularity, as I said it’s just like maths.
The reason why Indian students are not able to excel is simple: after entering into college they simply lose that intensity to go for the kill. Secondly the misconception that Algorithms competitions are meant only for CSE students. I have seen 4 yrs of ups and downs trying to master the skills — leave mastering, in my final year I can only give advice to my juniors about how to approach and develop skill in this area. You need to be consistent with the following:
- Programming is an exercise, it’ll not come after you complete your Algorithms course, nor is it a dependency
- You need MUCH MORE than learning a few algorithms, when it comes to implementation — the game is very different
- If you are consistent, you will improve, hence practice consistently on any of the existing interfaces
- Do not compare now, you’ll be utterly disappointed
. You are learning addition, so cannot think about finding logs right ? - Finally, the competition is still brewing in India — we lack far behind most nations, so the canvas is yours
Cheers!










