Given a 2D matrix, write an algorithm to traverse and print its elements in spiral order, supporting both clockwise and counter-clockwise directions starting from any of the four corners (top-left…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.