class Solution { public: vector<int> spiralOrder(vector<vector<int> > &matrix) { vector<int>ret; if (matrix.empty())return ret; int m = matrix.size(); int n = matrix[0].size(); if (m == 1 && n == 1)return { 1 }; int top = 0, down = m - 1, l...