Microsoft interview question

Ive already explained that there was a dynamic problem