Most Intuitive solution you will ever find!!✅ ✅ ✅ beats 90%.
Intuition\nAt first, it looked tricky to me, but as I broke it down to most simple blocks, I realised it is pretty easy when we think of it as simple dfs calls 
# Intuition\nAt first, it looked tricky to me, but as I broke it down to most simple blocks, I realised it is pretty easy when we think of it as simple dfs calls of going down, right and left with some additional simple if elses!!\n\n# Approach\nWe have three directions to go in.\n1) **Down** -> if the current block is marked as \'1\' we have the flexibilty of going to right. else we can go left.\n\n2) **Right** -> If the block we are heading to is marked as \'1\' we can only move in this condtion or else the ball will get stuck.\n\n3) **Left** -> Similar to right one, try understanding yourself.\n\n# Complexity\n- Time complexity:\n- O(mn)\n\n- Space complexity:\n  O(n) + recursion stack space\n\n# Code\n```\nclass Solution {\npublic:\n//0->down 1->right 2->left\nint dfs(vector<vector<int>>& grid, int r, int c, int m, int n,int dir){\n    //base case at the end\n    if(r==m) return c;\n\n\n    if(dir==0){                                 //coming from top to down\n        if(grid[r][c]==1){    //right direct\n            if(c==n-1) return -1;\n\n\n            else return dfs(grid,r,c+1,m,n,1);\n        }\n\n        else if(grid[r][c]==-1){   //directing to left\n            if(c==0) return -1;\n\n            else return dfs(grid,r,c-1,m,n,2);\n        }\n    }\n\n    else if(dir==1){             //coming from right to left\n        //it can either go down, or get stuck. so two conditions.\n\n        if(grid[r][c]==-1) return -1;\n\n        else if(grid[r][c]==1) return dfs(grid,r+1,c,m,n,0);\n    }\n\n    else if(dir==2){             //coming from left to right\n        if(grid[r][c]==1) return -1;\n\n        else if(grid[r][c]==-1) return dfs(grid,r+1,c,m,n,0);\n    }\n    return -1;\n}\n    vector<int> findBall(vector<vector<int>>& grid) {\n        int m=grid.size(), n=grid[0].size();\n\n        vector<int> ans(n);\n        for(int col=0;col<n;col++){\n            ans[col] = dfs(grid, 0, col, m,n,0);\n        }\n        return ans;\n    }\n};\n```
['C++']