Today’s SRM was interesting. It was at 1pm so the time was fine, except I was finding it really hard to not be distracted by the goings on at work (the clock was off).
The first problem was a simple set logic worth 250 points. I completed that in 10m39s for 220.59 points.
The second problem was also simple, but involved tracking DVDs and there cases. I spent ages muddling on paper what to track in my SortedList. After much time wastage, I settled for tracking the DVD’s and what case they where in, as the final output was to be sorted by the DVDs title. It took a while to get it working for the first two test cases. The output was arrays of string, so I did visual inspection. Mistake, as I did not cover the third example correctly. The third case covered the clause “You should return a String where each element describes a movie that is in a different movie’s case after all DVDs have been viewed.”
So after 42m49s I submitted my solution for 232.15 points, and once again I lost the points due to not reading the problems correctly. It least it was system test that found the problem, not other competitors. But gosh I’m getting sick of it.
I read the new article Competing tomek-style afterwards, and I think I need to note down the constraints, as this seems to be what’s letting me down.
The third problem was about optimal deque sorting and was worth 900 points. With only 20 minutes left on the clock, I thought about the problem, but did not make any progress on it. I agree with the article that solving the problem on paper first is the best idea. In the past I’ve started coding before having worked out what I’m doing, and then you have to recode things to use different containers or the likes.