In an adjacency list representation of an undirected simple graph \(G =…
GATE · 2016 · CS · Set 2 · Computer Science & IT
In an adjacency list representation of an undirected simple graph , each edge has two adjacency list entries: [] in the adjacency list of , and [] in the adjacency list of . These are called twins of each other. A twin pointer is a pointer from an adjacency list entry to its twin. If || = and || = , and the memory size is not a constraint, what is the time complexity of the most efficient algorithm to set the twin pointer in each entry in each adjacency list?
- A.
- B.
- C.
- D.
Attempted by 460 students.
Sign up free to check your answer
Sign up freeLoading lesson…