How can we perform Depth First Search on a tree on external memory in O(sort(N))?

37 views Asked by At

I know that we need an external stack data structure which takes O(1) I/O's for push() and pop() if buffer is full/empty,else no I/O's. And we have to use an adjacency list,which takes O(|V| + |E|/B) on general graphs.(I'm not sure but i assume that it takes O(|V|) on trees)

0

There are 0 answers