Practice Test Geeks home

CodeSignal Technical Assessment Matrix Traversal and Logic Questions and Answers

A developer is implementing a spiral traversal algorithm for a 2D matrix, starting from the top-left corner and moving clockwise.
Given the matrix `[[1, 2, 3], [8, 9, 4], [7, 6, 5]]`, what is the correct sequence of visited elements?

Select your answer