✨💯EASY SOLUTION.. direct and simple implementation, super easy to understand...✨✨💯💯
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<vector<int>> spiralMatrixIII(int rows, int cols, int rStart, int cStart) {\n        vector<vector<int>> ans;\n        ans.push_back({rStart, cStart});\n        int rl=rStart; int cl=cStart;\n\n        int x=1;\n        while(ans.size()< rows*cols){\n            if(x%2==1){\n                for(int i=0; i<x; i++){\n                    int col=cl+1;\n                    if(col < cols && col>=0 && rl < rows && rl>=0) {ans.push_back({rl, col}); }\n                    cl=col;\n                }\n                for(int i=0; i<x; i++){\n                    int row=rl+1;\n                    if(row < rows && row>=0 && cl < cols && cl>=0) {ans.push_back({row, cl}); }\n                    rl=row;\n                }\n            }\n            if(x%2==0){\n                for(int i=0; i<x; i++){\n                    int col=cl-1;\n                    if(col < cols && col>=0 && rl < rows && rl>=0) {ans.push_back({rl, col});}\n                    cl=col;\n                }\n                for(int i=0; i<x; i++){\n                    int row= rl-1;\n                    if(row < rows && row>=0 && cl < cols && cl>=0) {ans.push_back({row, cl});}\n                    rl=row;\n                }\n            \n            }\n            x++;\n        }\n        return ans;\n    }\n};\n```
['Array', 'Matrix', 'Simulation', 'C++']