MineWhat interview question

The question was an algorithmic problem related to strings.