Schrödinger interview question

Started with DSA question on array