Lately, I have been participating in
Topcoder's Single Round Matches [SRM] to get my algorithms and programming skills 'in shape'. In last couple of months, I 'attempted' to participate in 4 to 5 SRMs (between 596 to 606) and noticed few things. To be good at it, its not enough to have strong algos and data structures knowledge. One needs to understand their language of operation well, execute it flawlessly, in a very short window, overcome their poor habits (more on this later) and all the while compete against best programmers in the world, who appear to me like
Marvel's superheroes in programming world.
In this post, I'll share my experience participating in these SRM's. My current score (467) is by no measure considered good in SRM rankings and falls in the middle of gray spectrum (bottom most among ranked players). I only participated in 7 rated events. But I'll be at it and hope to become green in next 6-8 months.
SRM 596 - I planned so much to participate in this. I live in PST timezone and this was starting at 8am. Very bad timing as I drop my kid to daycare and there is lot of activity at home during this time. Still, I made arrangements with my wife and all that. But in last minute, my kid just wouldn't let me go. I had to drop out in last minute :(
SRM 597 - Woke up at 3am or so to participate (match starts at 4am). I was reading up on Java String API's and few minutes before the match, tried to register. But guess what. I couldn't. I was too late for registration. TC closes registrations 5 minutes before the match and I was late. Sloppy!
SRM 598 - I finally participated in this but my own poor habits worked against me
Its a trivial problem. But during the interview, I misunderstood the use of `continue` and was seeing unexpected results. I just kept debugging it and wasted the whole time. I could have dropped the entire approach of `continue` and tried something new. This is where 'poor habits' mentioned above will come in to play during competitions. I couldn't submit this problem and lost 85 points and dropped below 400.
SRM 599: My performance in this was middling as I ranked 11th in a room of 20. I can massage my ego by saying that 8 out of 20 were green :)
250 point problem was trivial and done quickly. For the 500 point problem, I was trying
BigInteger library of Java and was failing system tests. This is not the right approach. I'll blog the right way to solve in a separate post. This is where writers make sure that knowledge of language libraries don't play too much role. Just plain Math skills and programming ingenuity.
SRM 607: Due to various personal reasons, there was a big break (2 months) in participation. Finally, participated in this one.
250 point was easy and I thought,
500 point was also easy. But there was a bug in the code and finally, could not submit 500 point problem. I was ranked 9th in a room and could have vastly improved on ranking had that submission been successful. All my SRM code can be seen on my
github account.
To do well in TC SRM, I think the following will help:
- Lots and lots of practice (for a regular programmer) on TC Arena (and not just in your IDE).
- Knowledge (not necessarily in depth) in varied areas are essential: Data Structures, Graph Algos, Simple Math, Probabilities, Computational Geometry, Dynamic Programming etc. However, there are lot of problems that require simple logic and most programmers can solve Div II problems 250/500 level.
- Ability to execute your algorithm flawlessly in short duration. IMO, this is the most crucial skill and attracts least attention. I mean, this skill will be enhanced by continuous participation in competitive programming and will play significant role during job interviews and later on in your job role.
- Reading others code: There are lot of brilliant people participating in TC. Not everyone are Red. However, taking time to read other's code gives us lot of insights. Downside: It takes time acquainting ourselves to others code.
- Editorials: I say, do #4 & #5 only after working on a problem for some time. Otherwise, the solution doesn't stick in the mind and point is missed.