Competitive Programming
Competitive Programming
Solved about 300 problems on SPOJ in this order - Sphere Online Judge (SPOJ)
Result ?
Indenting code
Fast typing :P
How ?
Before starting programming, I searched about how and where to start, many said
"Learn an Algorithm, implement it, solve problems related to it". I did notdo it that way,
If you know what algorithm to use you generally think in that direction and leave about
correctness. I did them problem by problem, easy to hard, I spent 1 - 4 hours on a
problem.
I get the idea, I code it, Get it Accepted. (I used to test a lot, I always wanted to get AC on
first go)
I do not get the idea, I save that problem and try it after a month again. If I still do not
get them, then search for hints. If it clearly needed some algorithm which I never used
then I first smile (? I could not only because I did not knew the algorithm :P ) and then
start reading about that algorithm. TopCoder had tutorials of almost all common
algorithms. This is where I did a BIG MISTAKE. I never cared about correctness or
run-time analysis proof, I always learned how to solve the problem using that algorithm,
I hardly learned about how the algorithm works. I feel bad about it now, but that is how I
solved those problems then. I solved max-flow, convex hull, etc., problems using
described algorithms but I did not UNDERSTAND those algorithms then.
Mistake: Once I started taking part in contests, I completely stopped practice.
35th in Global Ranking
CodeChef long contests are comparatively easy ( Which is good, You can learn a lot),
you get a lot of time to think about a problem, search for resources. You only need
KEYWORDS to search for similar problems.
I gave a lot of time for each contest. I used to solve 4 easy problems in 2-3 days, then
take 5-6 days for other 3 problems.