Mavenhive Interview Search problem