Fraudulent Activity Notifications XII (implementing quicksort)
Found issue with index indexes in recursion, and when splitting the array it was reusing the same array, the partition should be return as index -1, rather than index
while (left < right)
while (arr[left]<pivot)
...
while(arr[right]>pivot)
....
#here left is equal right
return left -1
while (left < right)
while (arr[left]<pivot)
...
while(arr[right]>pivot)
....
#here left is equal right
return left -1
Comments
Post a Comment