✅✅C++ Simple Iterative Solution
\nvector<int> findBall(vector<vector<int>>& grid) {\n        \n        int n = grid.size();\n        int m = grid[0].size();\n        \n        vector<int>ans;\
```\nvector<int> findBall(vector<vector<int>>& grid) {\n        \n        int n = grid.size();\n        int m = grid[0].size();\n        \n        vector<int>ans;\n        \n        for(int k=0;k<m;k++){\n            \n            int i = 0;\n            int j = k;\n            \n            while(i < n){\n                \n                if(grid[i][j] == 1 && j < m-1 && grid[i][j+1] == 1){\n                    i++;\n                    j++;\n                }\n                else if(grid[i][j] == -1 && j > 0 && grid[i][j-1] == -1){\n                    i++;\n                    j--;\n                }\n                else{\n                    break;\n                }                \n            }\n            \n            if(i == n){\n                ans.push_back(j);\n            }\n            else ans.push_back(-1);\n            \n        }\n\n        return ans;\n    }\n```
['C', 'Matrix', 'Iterator']