Microsoft interview question

Gave 2 technical whiteboarding problems