Oracle interview question

spiral matrix code dsa c++