...

/

Solution: Where Will the Ball Fall

Solution: Where Will the Ball Fall

Let's solve the Where Will the Ball Fall problem using the Matrices pattern.

Statement

You have nn balls and a 2D grid of size m×nm \times n representing a box. The box is open on the top and bottom sides. Each cell in the box has a diagonal that can redirect a ball to the right or the left. You must drop ...

Access this course and 1400+ top-rated courses and projects.