← Morgan Stanley questions
CodingReported in a candidate post, Nov 2025

Print a matrix in spiral order

Filed under Morgan Stanley · Also reported at Citrix, Expedia, Walmart

Given an m x n matrix, return (or print) all its elements in spiral order, starting at the top-left and moving clockwise inward.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Morgan Stanley questions

Collected from public candidate posts and coding forums. Updated Nov 2026.