Google Interview Question

Time complexity of DSU and BFS/DFS