Redfin Interview Question

Phone: 2D matrix spiral