Microsoft interview question

coding question on dsa question on arrays