Amazon Phone Interview | SDE
Anonymous User
868

Given a graph, compelete the function below to find the longest path.

public int findLongestPath(Map<Integer,List<Integer>>){

}

Input Map:
1 [2,3,4]
2 [1,5,6]
3 [1]
4 [1,7]
5 [2]
6 [2]
7 [4]

O/p - 4

Comments (6)