Microsoft interview question

it was an easy algorithm question on the whiteboard