A simple exercise on searching algorithms
hackerearth.com