From 250ad8fd047d86bad6b6de29e674ebf4e289695b Mon Sep 17 00:00:00 2001 From: Paridhi Gupta <56124266+Paridhi0309@users.noreply.github.com> Date: Sat, 3 Oct 2020 00:43:01 +0530 Subject: [PATCH] Update MergeSort.py --- MergeSort.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MergeSort.py b/MergeSort.py index d715c89..02df4e3 100644 --- a/MergeSort.py +++ b/MergeSort.py @@ -16,7 +16,7 @@ def mergeSort(arr): i = j = k = 0 - while i < len(L) and j < len(R): + while (i < len(L) and j < len(R)): if L[i] < R[j]: arr[k] = L[i] i+=1 @@ -26,12 +26,12 @@ def mergeSort(arr): k+=1 - while i < len(L): + while (i < len(L)): arr[k] = L[i] i+=1 k+=1 - while j < len(R): + while (j < len(R)): arr[k] = R[j] j+=1 k+=1