development_Hactoberfest23 icon indicating copy to clipboard operation
development_Hactoberfest23 copied to clipboard

new code

Open Anshv9616 opened this issue 4 months ago • 0 comments

These changes enhance the clarity and maintainability of the code while preserving its functionality.

Constants: Used static final for N and INF to make the code cleaner and easier to adjust.

Initialization: Initialized distances directly in the loop, simplifying the condition for the next nodes.

Commenting: Enhanced comments to provide clarity on the purpose of each section of the code.

Loop Adjustment: Changed the inner loop from i to j to only check subsequent nodes (i + 1), which reflects the nature of multi-stage graphs better

Anshv9616 avatar Oct 06 '24 17:10 Anshv9616