1,099 views
0 0 votes

If G = (V,E) is a directed graph, then length of adjacency list is ______ and it requires ______ amount of memory.

  • 1

    2|E|, θ(V)

  • 2

    |E|, θ(V+E)

    Correct Answer

  • 3

    |E|, θ(E)

  • 4

    2|E|, θ(V+E)


Shouldnt the ans be 2|E| for the length of the adjacency list as every edge would be stored twice?

Please log in or register to answer this question.

Position:
Show:

Related questions

1 1 vote
1 1 answer
554
554 views
amit166 asked Jan 5, 2023
554 views
Time complexity=$\sum_{i=1}^{n}[\log (\frac{n}{i})] is$
0 0 votes
1 answers 1 answer
520
520 views
anjali007 asked Dec 17, 2018
520 views
The characters of the string K R P C S N Y T J M are inserted into a hash table of size of size 10 using hash functionh(x) = (ord(x) - ord(A) +1)If linear probing is used...
1 1 vote
0 0 answers
2.2k
2.2k views
anjali007 asked Dec 17, 2018
2,172 views
Assume there are 1024 men, each with distinct arm strength, in an arm wrestling match stronger arm always wins. Number of arm wrestling matches required to find men with ...
2 2 votes
1 answers 1 answer
1.0k
1.0k views
Raj_Choudhary asked Nov 22, 2017
1,046 views
Suppose in an array A[] , we exchange elements A[i] and A[i+k] , which were originally out of orderA) at least 1 and at most 2k-1 inversions are removedB) at least 2 and ...