Microsoft interview question

Time complexity Space Complexity and Dry run