Microsoft Interview Question

they asked me an algorithmic question.