Write a program to print the elements of an M x N matrix in spiral order. Start from the top-left element, move right to the end of the row, then down to the end of the column, then left, then up…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.