

MCQOPTIONS
Saved Bookmarks
1. |
What would be the time complexity of the following function which adds an edge between two vertices i and j, with some weight ‘weigh’ to the graph having V vertices? |
A. | O(1) |
B. | O(V) |
C. | O(V*V) |
D. | O(log V) |
Answer» B. O(V) | |