105k views
4 votes
The following implementation of QuickSort static void doQuickSort(int array[ ], int start, int end) { int pivotPoint; pivotPoint = partition(array, start, end); doQuickSort(array, pivot+1, end); doQuickSort(array, start, pivot-1); }

User Minas
by
7.8k points

1 Answer

4 votes

Answer:

The answer to this question is "To make too many recursive calls, the program will be terminated".

Explanation:

In the given code we define a function that is "doQuickSort". in the function parameter we pass three integer parameter that is "start, end and array[]" were start and end is variable and array is array[].

  • Inside a function we define an integer variable that is "pivotPoint" and in a variable, we call the partition function that accepts the same parameter that is defined in the function.
  • Then we call doQuickSort function two times which is also known as recursive function.

we call this function to many times that's why it will be terminated.

User Moujtahed
by
6.9k points