In the Bellman-Ford algorithm, when detecting a negative cycle and printing the cycle during the final iteration, the step of backtracking through parents n times ensures the identification of a node within the negative cycle. This guarantees that the negative cycle will be correctly reconstructed and printed. why and how??
I have tried drawing graphs and applying this method. It works, but I could not figure out why??