0 0 votes The time required to find the shortest path in a graph with $n$ vertices and $e$ edges is: $O(e)$ $O(n)$ $O(e^{2})$ $O(n^{2})$ Algorithms ugcnetcse-june2007-paper2 graph-algorithms shortest-path asymptotic-notations algorithm-design + – go_editor 2.5k views answer comment Share Follow Print See 1 comment 1 1 comment reply mcjoshi commented Aug 24, 2016 reply Follow flag If the Graph is represented using Adjacency Matrix, it is $ O(V^2) $ . If the input graph is represented using adjacency list it can be reduced to $O(E log V)$ with the help of binary heap. Just replace E by $e$ and V by $ n$ to get your answer 1 1 replyShare Please log in or register to add a comment.
0 0 votes answer is option D vidhuc answered Aug 24, 2016 vidhuc comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Dijktra's algorithm's time complexity is V.log(V) + E (using fibonacci heaps). They have given #edges as 'e'. Now, 'e' can be equal to V*V. Also, the notation being used is big-O. So, answer is (D). Sushant Gokhale answered Aug 24, 2016 Sushant Gokhale comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Undirected graph BFS=O(V+E)=O(n+e) Directed graph dijkstra algorithm with list = O($V^{2}$)=O($n^{2}$) dijkstra algorithm with binary heap=O((E+V)LOGV)=O((e+n)log(n)) dijkstra algorithm with fibbonacci heap=O((E+VLOGV)=O((e+nlog(n)) Bellman ford algorithm=O(VE)=(ne) ANSWER SHOULD BE OPTION D Mohit Kumar 6 answered May 5, 2020 Mohit Kumar 6 comment Share Follow 0 reply Please log in or register to add a comment.