Re:How a 19-Year-Old Raised $5 Million to Revolutionize Search
by ashish_0x90 on Tuesday March 01, 2011 @03:30PM
(#2277057)
I did manage to solve all three problems and I really liked the way the problems were put up on the website.
Anyway, I would still suggest trying for some more time before looking at the solution that that I have provided here - https://gist.github.com/849813 .
The first problem itself took me most of the time. All this time I was trying to come up with a optimal approach (and was stuck in some boundary condition in implementation for Approach 1) until I realized that even a brute force solution will work in this case because of the smaller text input.
Anyway, I would still suggest trying for some more time before looking at the solution that that I have provided here - https://gist.github.com/849813 .
The first problem itself took me most of the time. All this time I was trying to come up with a optimal approach (and was stuck in some boundary condition in implementation for Approach 1) until I realized that even a brute force solution will work in this case because of the smaller text input.