A day after my manager released the results of the programming contest, he updated the results showing that Mike Nielsen had a faster solution. I asked Mike what he did. Mike computed the reversed sentence once and then stores the result in a HashMap. This is a very clever trick. Mike realized that the same data would be used over and over again in the test harness and took advantage of that. Clearly Mike’s solution wouldn’t be that fast in a real world situation but this clearly isn’t a real world problem.
One Response
mheath
April 9th, 2007 at 11:10 am
1A day after my manager released the results of the programming contest, he updated the results showing that Mike Nielsen had a faster solution. I asked Mike what he did. Mike computed the reversed sentence once and then stores the result in a HashMap. This is a very clever trick. Mike realized that the same data would be used over and over again in the test harness and took advantage of that. Clearly Mike’s solution wouldn’t be that fast in a real world situation but this clearly isn’t a real world problem.
RSS feed for comments on this post · TrackBack URI
Leave a reply