A. Wrong . because for Dijkstra’s we need a edge weight . or to find single source shortest path of unweighted BFS is used.
B. Wrong . because Bellman’s ford algorithm can detect the negative edge weight cycle reachable from source.
C . right
time complexity of Dijkstra’s using unsorted array and with adjacency matrix of
(n vertices and e edges) = Ɵ(n2) + Ɵ(n2) + Ɵ(e)
= Ɵ(n2)
D right : because in all case time complexity of Bellman’s ford algorithm is Bellman’s ford Ɵ(n3)
ans : C , D