[Python3] simulation
Algo\nFor each ball, we simulate its trajectory following the dynamics and decide where it falls. \n\nImplementation (196ms, 100%) \n\nclass Solution:\n    def 
**Algo**\nFor each ball, we simulate its trajectory following the dynamics and decide where it falls. \n\n**Implementation** (196ms, 100%) \n```\nclass Solution:\n    def findBall(self, grid: List[List[int]]) -> List[int]:\n        m, n = len(grid), len(grid[0]) # dimensions\n        ans = [-1]*n \n        for j in range(n): \n            k = j\n            for i in range(m):\n                kk = k + grid[i][k]\n                if not 0 <= kk < n or grid[i][k] * grid[i][kk] < 0: break\n                k = kk \n            else: ans[j] = k # no break \n        return ans \n```\n\n**Analysis**\nTime complexity `O(MN)`\nSpace complexity `O(N)`
['Python3']