576. Out of Boundary Paths (Medium)