Return all elements of matrix in spiral order.
Sample Input:
[[1,2,3],[4,5,6],[7,8,9]]
Sample Output:
[1,2,3,6,9,8,7,4,5]
Hints
Hint 1
Use four boundaries: top, bottom, left, right
Hint 2
Traverse in order: right, down, left, up
Hint 3
Adjust boundaries after each direction