Mehes Andrew F J
2004-04-18 21:13:58 UTC
Hello, I was just wondering, in cases where we are asked to find the
complexity of finding, for example, if 2 given edges are adjacent in an
adjacnecy list, do we assume that we already know where one of the two
vertices is stored in the adjacency list array or do we have to have
account for traversing the matix. in other words, would the worse case for
this scenario be O(V+E) or O(V)?
Thank you.
complexity of finding, for example, if 2 given edges are adjacent in an
adjacnecy list, do we assume that we already know where one of the two
vertices is stored in the adjacency list array or do we have to have
account for traversing the matix. in other words, would the worse case for
this scenario be O(V+E) or O(V)?
Thank you.