← Morgan Stanley questions

Random traversal visiting every cell in an 8x8 matrix exactly once

Filed under Morgan Stanley

Given an 8x8 matrix and an arbitrary starting coordinate, write an algorithm to visit every cell in the matrix exactly once in a random order, printing or returning the sequence of visited cells.

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.