Given an M x N matrix, return an array of all elements in diagonal order. Start at (0,0), move diagonally up-right until hitting a boundary, then switch direction to down-left.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.