79334851

Date: 2025-01-07 03:41:35
Score: 2
Natty:
Report link

Dijiktras Algorithm does'nt work on a graph with negative cycles it can be modified to work in case of negative edges by removing the visited array.

consider a graph like below:-

(u,v,w)->representation u to v their is a edge with weight w.

(1,2,-1) (2,3,5) (1,3,2)

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ankit Saini