amazon

Anonymous User
263
Jan 10, 2025

i had amazon phone intrview and this my questions similar to leetcode Number of Connected Components in an Undirected Graph
int[][] edges = {{0, 1}, {0, 2}, {1, 2}, {1, 3}, {3, 4},{5,6},{6,7},{8,5},{10,null}};
out put n1={0,1,2,3,4} , n2 {5,6,7,8}, n3 {10}

Comments (0)