easy to click Greplin Programming Challenge: http://challenge.greplin.com/ Anyone managed to pass level 1? I am stuck at level 1. Please share the logic.
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.