Microsoft interview question

Logical and coding questions were asked