CPP solution faster than  99.12%
On observing we need to take take steps in each direction two times, like we start from left, then we take one step to left than we go down(directed to) and tak
On observing we need to take take steps in each direction two times, like we start from left, then we take one step to left than we go down(directed to) and take one step there, after that we need to take 2 steps the same way to right and to up, the  solution is the sollowing the same rule> I know its a bit lengthy but ***TIME MATTERS*** most IMO.(99.12%)\n```\nvector<vector<int>> spiralMatrixIII(int rows, int cols, int rStart, int cStart) {\n        vector<vector<int>> ans;\n        vector<int>temp;\n\t\t//base case\n        if(rows==1 && cols==1){\n            temp.push_back(0);\n            temp.push_back(0);\n            ans.push_back(temp);\n            return ans;\n        }\n        int steps=1;\n        int n=2;\n        int size=0;\n        int x=rStart,y=cStart;\n\t\t\n\t\t//variable for tracking the direction\n        char dir=\'r\';\n\t\t\n\t\t//for first step\n        temp.push_back(x);\n        temp.push_back(y);\n        ans.push_back(temp);\n        size++;\n        temp.clear();\n        while(size<=cols*rows){\n            for(int i=0;i<n;i++){\n                for(int j=0;j<steps;j++){\n                    if(dir==\'r\')y++;\n                    else if(dir==\'b\')x++;\n                    else if(dir==\'l\')y--;\n                    else if(dir==\'u\')x--;\n                    if(x>=0 && x<rows && y>=0 && y<cols){\n                        temp.push_back(x);\n                        temp.push_back(y);\n                        ans.push_back(temp);\n                        temp.clear();\n                        size++;\n                        if(size==cols*rows)return ans;\n                    }\n                }\n                if(dir==\'r\')dir=\'b\';\n                else if(dir==\'b\')dir=\'l\';\n                else if(dir==\'l\')dir=\'u\';\n                else if(dir==\'u\')dir=\'r\';\n            }\n\t\t\t//after two iterations in 2 directions we need to change the number of steps\n            steps++;\n        }\n        return ans;\n    }\n```
['C', 'C++']