[C++] Simple Solution
Suppose there\'re total n columns, then there\'re total n balls, dropping from (0, j), j in range of [0, n). For each ball, it starts at position (row = 0, col 
Suppose there\'re total n columns, then there\'re total n balls, dropping from (0, j), j in range of [0, n). For each ball, it starts at position (row = 0, col = j). At current grid grid[row][col], it will decide this ball\'s next position. If grid[row][col] == 1, this ball\'s next position will be (row+1, col+1); If grid[row][col] == -1, this ball\'s next position will be (row+1, col-1). \nThere\'re two situations where this ball cannot reach the last row:\n1. This ball stucks at the wall. which means this ball needs to go to (row+1, col+1), but col+1 >= n; or this ball needs to go to (row+1, col-1), but col - 1 < 0.\n2. This ball stucks at V shape, which means this grid[row][col] == 1 and grid[row][col+1] == -1; Or grid[row][col] == -1 and grid[row][col-1] == 1.\n\nIf this ball stucks, push back -1 into ans and break the while loop; If this ball reaches the last row, push back current col into ans.\n```\nclass Solution {\npublic:\n    vector<int> findBall(vector<vector<int>>& grid) {\n        int m = grid.size();\n        int n = grid[0].size();\n        vector<int> ans;\n        for (int j = 0; j < n; j++) {\n            int row = 0, col = j;\n            while (row < m) {\n                if (grid[row][col] == 1) {\n                    if (col+1 >= n || grid[row][col+1] == -1) {\n                        ans.push_back(-1);\n                        break;\n                    }\n                    col++;\n                } else if (grid[row][col] == -1) {\n                    if (col-1 < 0 || grid[row][col-1] == 1) {\n                        ans.push_back(-1);\n                        break;\n                    }\n                    col--;\n                }\n\t\t\t\trow++;\n            }\n            if (row == m) {\n                ans.push_back(col);\n            }\n        }\n        return ans;\n    }\n};\n```
[]