813 views
0 votes
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.

Related questions

1 votes
1 votes
1 answer
1
amit166 asked Jan 5, 2023
303 views
Time complexity=$\sum_{i=1}^{n}[\log (\frac{n}{i})] is$
1 votes
1 votes
0 answers
3
anjali007 asked Dec 17, 2018
765 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 votes
2 votes
1 answer
4
Raj_Choudhary asked Nov 22, 2017
627 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 ...