Simple C++ Solution || Faster than 99%
\nclass Solution {\npublic:\n    int dfs(vector<vector<int>>& grid, int col, int row){\n        if(grid[row][col] == -1){\n            if(col == 0){\n          
```\nclass Solution {\npublic:\n    int dfs(vector<vector<int>>& grid, int col, int row){\n        if(grid[row][col] == -1){\n            if(col == 0){\n                return -1;\n            }\n            if(grid[row][col-1] == 1){\n                return -1;\n            }\n            if(row+1 == grid.size()){\n                return col - 1;\n            }\n            return dfs(grid, col - 1, row + 1);\n        }\n        if(grid[row][col] == 1){\n            if(col == grid[0].size() - 1){\n                return -1;\n            }\n            if(grid[row][col+1] == -1){\n                return -1;\n            }\n            if(row+1 == grid.size()){\n                return col + 1;\n            }\n            return dfs(grid, col + 1, row + 1);\n        }\n        \n        return -1;\n    }\n    vector<int> findBall(vector<vector<int>>& grid) {\n        int n = grid[0].size();\n        vector<int>ans;\n        for(int i = 0; i < n; i++){\n            ans.push_back(dfs(grid, i, 0));\n        }\n        \n        return ans;\n    }\n};\n```
[]