easy to understand 11 line Python3 solution
\n    def findBall(self, grid: List[List[int]]) -> List[int]:\n        nrows = len(grid)\n        ncols = len(grid[0])\n        def candrop(i,j):\n            i
```\n    def findBall(self, grid: List[List[int]]) -> List[int]:\n        nrows = len(grid)\n        ncols = len(grid[0])\n        def candrop(i,j):\n            if i == nrows: return j\n            if j == ncols-1 and grid[i][j] == 1: return -1\n            if j == 0 and grid[i][j] == -1: return -1\n            if grid[i][j] == 1 and grid[i][j+1] == -1: return -1\n            if grid[i][j] == -1 and grid[i][j-1] == 1: return -1\n            return candrop(i+1,j+grid[i][j])\n        \n        return [candrop(0,j) for j in range(ncols)]\n```
[]