Did it happen? Not on your life.
Instead, I came out of this SRM with my lowest score ever, and dropped to my lowest rating yet. To add insult to injury, it wasn't because I was unable to solve all the problems - I actually did all 3, including the 1000 pointer. Carelessness and stupidity killed the medium and the hard in systests, and sent me spiralling into the void...
The truly unforgivable mistake I made was the 500 pointer - under other circumstances I would have cracked it instantly. Instead of seeing the obvious solution, I came up with an ugly approach that eventually failed systests...Even worse was that it managed all three examples from the problem statement. What should have tipped me off was the inordinate complexity of the solution - no div 2 medium could be that weird. If I'd been a little less impatient, I'd probably have seen the obvious attack and been the first to submit a solution. Since I already had the first submission for the 250 pointer, I could have comfortably finished somewhere at the top, even if I didn't get the 1000.
The 1000 was really sad - the solution was correct in every detail. It just so happens that it took into account one extra item of input, and so returned 0 where it should have returned -1...I'm still surprised by the cavalier way in which I read the problem statement - unforgivable!
NOTE: I was gonna write a lot of stuff here, but I accidentally navigated away from the page and lost my post. No longer in the mood to rewrite everything, so the gist follows...
Here's a quote from Jonathan Livingston Seagull that perfectly sums up the lessons of SRM 247:
The gulls who scorn perfection for the sake of travel go nowhere, slowly. Those who put aside travel for the sake of perfection go anywhere, instantly.It's about seagulls, but the symbolism should be obvious...
And here are a couple of guidelines I've come up with to improve my approach:
- Never get caught up in the sheer excitement of your power, newfound though it may be. If you do, your delusions of grandeur will remain just that - delusions.
- Forget details like timing, ratings and rankings. Focus on the problems - if you master those, all else will follow.
- The point value is usually a pretty good guide to the difficulty level of a problem. If your solution seems overly complex by that measure, then it may be worth exploring alternative approaches.
- Read the problem statement - pay specific attention to constraints and details - your solution may break if you miss something.
- Forget about your speed of coding relative to other coders - just code. (This is properly a part of (2), but it's worth mentioning as a separate point.)
- All this is easier said than done. Internalize it - reduce it to instinct.
*The writer suddenly experiences a moment of transcendental enlightenment.*
Hey, all this writing has suddenly made the true problem clear - in fact, it's summed up wonderfull by Morpheus in The Matrix when he tells Neo:
There's a difference between knowing the path, and walking the path.For those who haven't understood this - you're either extremely dense, or I'm not a very clear writer. Either of these is possible, but I lean towards the former...
I have a feeling blogging has actually improved my coding and problem solving ability - presumably because it helps identify problem areas. And of course, writing stuff down cements your understanding of it.
Okay, time for other news - I have TCS placements tomorrow. Unfortunately, this means we have to go over to RAIT in Nerul, and rather early in the morning. Huge pain, but no choice...
There's been an ugly side to this recruitment thingy - the form they've put up on the website for campus recruitment registrations - it's a sort of resume - it's a marvel of bad design. Rather surprising, considering the size and quality that TCS is known for. It has serious compatibility issues with Firefox - you can't see the cursor - stuff is rendered in grey...not exactly a good intro with all the techies using Firefox these days. When I finally got around to opening it in IE(yecch!), it turned out to be weirdly set up - all sorts of useless details were mandatory for submission, and there were unexpected maximum size restrictions on some fields as well. I suppose 'campus recruitment' is a fairly wide ranging thing, involving people who haven't yet graduated, those who are just out of college, and postgrads as well - so you can chalk up the useless details to that aspect. Still, if anyone from TCS happens by, please tell the guys in charge of the website to fix it...technical incompetence from such a reputed company is a real turnoff.
I suppose that's it for now. Will blog about the TCS experience tomorrow or day after...
No comments:
Post a Comment