From fc7625d1d00b3eafa7e955ef57bc8108140bdb83 Mon Sep 17 00:00:00 2001 From: George Mani <49112969+georgemani1225@users.noreply.github.com> Date: Thu, 28 Oct 2021 22:26:23 +0530 Subject: [PATCH] Update Maximum_sum_path_array.py --- python/Arrays/Maximum_sum_path_array.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/Arrays/Maximum_sum_path_array.py b/python/Arrays/Maximum_sum_path_array.py index 77b1cb9..d266e58 100644 --- a/python/Arrays/Maximum_sum_path_array.py +++ b/python/Arrays/Maximum_sum_path_array.py @@ -1,7 +1,7 @@ # Python program to find maximum sum path -# This function returns the sum of elements on maximum path from -# beginning to end +# This function returns the sum of elements on maximum path from +#beginning to end def maxPathSum(ar1, ar2, m, n): @@ -12,7 +12,7 @@ def maxPathSum(ar1, ar2, m, n): # Initialize result and current sum through ar1[] and ar2[] result, sum1, sum2 = 0, 0, 0 - # Below 3 loops are similar to merge in merge sort + # Below three loops are similar to merge in merge sort while (i < m and j < n): # Add elements of ar1[] to sum1 @@ -60,4 +60,4 @@ def maxPathSum(ar1, ar2, m, n): n = len(ar2) # Function call -print "Maximum sum path is", maxPathSum(ar1, ar2, m, n) \ No newline at end of file +print "Maximum sum path is", maxPathSum(ar1, ar2, m, n)