Grokking Graph Algorithms for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
Nivetha Govindan
Null Pointer exception

Nivetha Govindan

Mar 2, 2025

int[][] routesA = {{1,2,7}, {3, 6, 7}}; System.out.println(solution.numBusesToDestination(routesA, 8, 6)); // Output: 3 // We need a null check, before getting list of buses, code fails for below test case

0

0

Comments
Comments

On this page