A small hiccup for the LeetCode puzzle Where the ball will fall
Link to the original puzzle https://leetcode.com/problems/where-will-the-ball-fall/
My code does not print out the right output just yet
Could anyone kindly point me in the right direction?
My code does not print out the right output just yet
The output is -1, -1, -1, -1 whilst it is supposed to be 1, -1, -1, -1, -1. The input here is grid = [[1,1,1,-1,-1],[1,1,1,-1,-1],[-1,-1,-1,1,1],[1,1,1,1,-1],[-1,-1,-1,-1,-1]]`Could anyone kindly point me in the right direction?