Sunrise·Software Engineer·Technical Phone Screen
- Given an n×n matrix filled in spiral order from a fixed origin, find the value at coordinate (x, y) without constructing the matrix. Solution should run in O(1) time and space.
“I knew immediately this was about figuring out which 'ring' the coordinate sits in and then counting the offset along that ring's perimeter.”