development_Hactoberfest23
development_Hactoberfest23 copied to clipboard
new code
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