diff --git a/Divide_Conquer/1649.Create-Sorted-Array-through-Instructions/1649.Create-Sorted-Array-through-Instructions_DivideConque.cpp b/Divide_Conquer/1649.Create-Sorted-Array-through-Instructions/1649.Create-Sorted-Array-through-Instructions_DivideConque.cpp index 09ed2ea13..aa5bed503 100644 --- a/Divide_Conquer/1649.Create-Sorted-Array-through-Instructions/1649.Create-Sorted-Array-through-Instructions_DivideConque.cpp +++ b/Divide_Conquer/1649.Create-Sorted-Array-through-Instructions/1649.Create-Sorted-Array-through-Instructions_DivideConque.cpp @@ -35,37 +35,36 @@ class Solution { numSmaller[i] += iter-(sorted+a); } - int i=a, j=mid+1, p = 0; - while (i<=mid && j<=b) - { - if (sorted[i]<=sorted[j]) - { - temp[p] = sorted[i]; - i++; - } - else - { - temp[p] = sorted[j]; - j++; - } - p++; - } - while (i<=mid) - { - temp[p] = sorted[i]; - i++; - p++; - } - while (j<=b) - { - temp[p] = sorted[j]; - j++; - p++; - } - for (int i=0; i