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