Given a 2D matrix, print its elements in a spiral order starting from a specific coordinate (r, c) and moving in an initial direction (e.g., right, down, left, or 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.