Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

301.

Quick sort uses which of the following method to implement sorting?(a) merging(b) partitioning(c) selection(d) exchangingThis question was addressed to me by my college professor while I was bunking the class.The doubt is from Sorting topic in portion Sorting of Data Structures & Algorithms II

Answer»

The correct choice is (b) partitioning

For EXPLANATION: Quick SORT makes partitions of the input array about the pivot in order to IMPLEMENT SORTING. Thus its method of sorting is CALLED partitioning.

302.

What is the average time complexity of randomized quick sort?(a) O(n log n)(b) O(n^2)(c) O(n^2 log n)(d) O(n log n^2)This question was addressed to me in examination.This intriguing question comes from Sorting in chapter Sorting of Data Structures & Algorithms II

Answer» RIGHT option is (a) O(n LOG n)

Best explanation: The average case TIME COMPLEXITY of RANDOMIZED quick sort is same as that of standard quick sort as randomized quick sort only helps in preventing the worst case. It is equal to O(n log n).
303.

What is the auxiliary space complexity of randomized quick sort?(a) O(1)(b) O(n)(c) O(log n)(d) O(n log n)The question was posed to me in my homework.My question is based upon Sorting topic in section Sorting of Data Structures & Algorithms II

Answer»

Right choice is (C) O(LOG n)

Best explanation: Auxiliary space complexity of randomized quick sort is O(log n) which is USED for storing CALL stack FORMED due to recursion. Note that the algorithms with space complexity as O(log n) also qualifies as in place algorithms as the value of log n is close to 1.

304.

What is the purpose of using randomized quick sort over standard quick sort?(a) so as to avoid worst case time complexity(b) so as to avoid worst case space complexity(c) to improve accuracy of output(d) to improve average case time complexityThis question was addressed to me during an interview for a job.My question is from Sorting topic in portion Sorting of Data Structures & Algorithms II

Answer»

Right choice is (a) so as to AVOID worst case time complexity

To explain: RANDOMIZED quick sort helps in avoiding the worst case time complexity of O(N2) which occurs in case when the input array is ALREADY sorted. However the AVERAGE case and best case time complexities remain unaltered.

305.

What is a randomized quick sort?(a) quick sort with random partitions(b) quick sort with random choice of pivot(c) quick sort with random output(d) quick sort with random inputI got this question in an interview.This is a very interesting question from Sorting in section Sorting of Data Structures & Algorithms II

Answer»

Correct choice is (b) quick sort with RANDOM choice of pivot

The BEST I can explain: RANDOMIZED quick sort chooses a random element as a pivot. It is done so as to avoid the worst case of quick sort in which the input ARRAY is already sorted.

306.

Quick sort uses which of the following algorithm to implement sorting?(a) backtracking(b) greedy algorithm(c) divide and conquer(d) dynamic programmingI have been asked this question in homework.The query is from Sorting topic in chapter Sorting of Data Structures & Algorithms II

Answer» CORRECT answer is (c) divide and conquer

To EXPLAIN: Quick sort uses the technique of divide and conquer in order to sort a given array. It divides the array into two PARTS about the PIVOT and then apply a quick sort to both the parts.
307.

Which of the following is not true about QuickSort?(a) in-place algorithm(b) pivot position can be changed(c) adaptive sorting algorithm(d) can be implemented as a stable sortThis question was addressed to me in an online interview.The query is from Quicksort in chapter Sorting of Data Structures & Algorithms II

Answer»

Right CHOICE is (B) pivot position can be changed

Easiest explanation - Once a pivot is CHOSEN, its position is FINALIZED in the sorted array, it cannot be MODIFIED.

308.

The given array is arr = {2,6,1}. What are the pivots that are returned as a result of subsequent partitioning?(a) 1 and 6(b) 6 and 1(c) 2 and 6(d) 1I got this question in an internship interview.The origin of the question is Quicksort topic in division Sorting of Data Structures & Algorithms II

Answer»

Correct answer is (d) 1

Easiest explanation - There is only one PIVOT with which the array will be SORTED, the pivot is 1.

309.

What is the average case complexity of QuickSort?(a) O(nlogn)(b) O(logn)(c) O(n)(d) O(n^2)This question was addressed to me during an interview.I need to ask this question from Quicksort in division Sorting of Data Structures & Algorithms II

Answer» RIGHT answer is (a) O(nlogn)

EASY explanation - The position of partition(split) is unknown, hence all(n) possibilities are CONSIDERED, the AVERAGE is found by adding all and DIVIDING by n.
310.

Quick sort is a space-optimised version of ____(a) Bubble sort(b) Selection sort(c) Insertion sort(d) Binary tree sortThe question was posed to me in class test.My question is from Quicksort in portion Sorting of Data Structures & Algorithms II

Answer»

The correct OPTION is (d) Binary tree sort

The EXPLANATION is: Quick sort is a space-optimised version of the binary tree sort. In binary sort tree, the ELEMENTS are inserted sequentially into the binary search tree and Quick sort ORGANISES elements into a tree that is implied by the recursive calls.

311.

Which one of the following sorting algorithm is best suited to sort an array of 1 million elements?(a) Bubble sort(b) Insertion sort(c) Merge sort(d) Quick sortThe question was asked in quiz.This intriguing question comes from Quicksort topic in section Sorting of Data Structures & Algorithms II

Answer»

Right choice is (d) Quick sort

For explanation: The Quick sort is best suited to sort the ARRAY of 1 MILLION elements. The practical implementations of Quick sort use randomised version. In practice randomised Quick sort algorithms rarely shows worst CASE behaviour and is almost always O(nlogn). And Quick sort requires little additional space and exhibits good CACHE LOCALITY.

312.

A machine needs a minimum of 200 sec to sort 1000 elements by Quick sort. The minimum time needed to sort 200 elements will be approximately __________(a) 60.2 sec(b) 45.54 sec(c) 31.11 sec(d) 20 secThe question was asked in unit test.I need to ask this question from Quicksort topic in division Sorting of Data Structures & Algorithms II

Answer»

Right choice is (c) 31.11 sec

The best I can explain: The Quick sort requires NLOG2N comparisons in best case, where n is size of input ARRAY. So, 1000 * log21000 ≈ 9000 comparisons are required to sort 1000 elements, which takes 200 sec. To sort 200 elements MINIMUM of 200 * log2200 ≈ 1400 comparisons are required. This will take 200 * 1400 / 9000 ≈ 31.11 sec.

313.

Consider the Quick sort algorithm which sorts elements in ascending order using the first element as pivot. Then which of the following input sequence will require a maximum number of comparisons when this algorithm is applied on it?(a) 22 25 56 67 89(b) 52 25 76 67 89(c) 22 25 76 67 50(d) 52 25 89 67 76This question was addressed to me in examination.Enquiry is from Quicksort in section Sorting of Data Structures & Algorithms II

Answer»

Right OPTION is (a) 22 25 56 67 89

Easy explanation - If the input sequence is already sorted then worst CASE behaviour occurs for the Quick sort algorithm which use the first ELEMENT as pivot. Therefore, the input sequence given in 22 25 56 67 89 will require a maximum number of comparisons.

314.

Consider the Quick sort algorithm in which the partitioning procedure splits elements into two sub-arrays and each sub-array contains at least one-fourth of the elements. Let T(n) be the number of comparisons required to sort array of n elements. Then T(n)

Answer»

Right option is (B) T(n) <= T(n/4) + T(3n/4) + cn

The explanation is: If there are n/4 ELEMENTS in one sub-array then T(n/4) comparisons are needed for this sub-array. And T(3n/4) COMPARISON are required for the rest 4n/5 elements, and cn is TIME required for finding the pivot. If there are more than n/4 elements in one sub-array then other sub-array will have less than 3n/4 elements and time complexity will be less than T(n/4) + T(3n/4) + cn.

315.

Quick sort is a stable sorting algorithm.(a) True(b) FalseI got this question in an interview.This intriguing question comes from Quicksort in section Sorting of Data Structures & Algorithms II

Answer»

Right choice is (B) False

For explanation: In STABLE SORTING algorithm the records with equal keys APPEAR in the same order in the sorted sequence as they appear in the input unsorted sequence. Quick SORT does not preserve the relative order of equal sort items. Therefore, Quick sort is not a stable sort.

316.

The best case behaviour occurs for quick sort is, if partition splits the array of size ninto __________(a) n/2 : (n/2) – 1(b) n/2 : n/3(c) n/4 : 3n/2(d) n/4 : 3n/4I have been asked this question during an interview.The question is from Quicksort in chapter Sorting of Data Structures & Algorithms II

Answer»

Right choice is (a) n/2 : (n/2) – 1

The best I can EXPLAIN: The best case analysis of quick sort occurs when the PARTITION SPLITS the array into two subarrays, each of size no more than n/2 SINCE one is of size n/2 and one of size (n/2) – 1.

317.

Apply Quick sort on a given sequence 7 11 14 6 9 4 3 12. What is the sequence after first phase, pivot is first element?(a) 6 4 3 7 11 9 14 12(b) 6 3 4 7 9 14 11 12(c) 7 6 14 11 9 4 3 12(d) 7 6 4 3 9 14 11 12This question was addressed to me in semester exam.The above asked question is from Quicksort topic in chapter Sorting of Data Structures & Algorithms II

Answer»

The correct ANSWER is (B) 6 3 4 7 9 14 11 12

To explain: Let’s apply Quick SORT on the given sequence,

For first phase, PIVOT = 7

 71114694312

ij

 71114694312

ij

 73146941112

ij

 73469141112

ij

 73469141112

ji

 63479141112

318.

What is the worst case time complexity of the Quick sort?(a) O(nlogn)(b) O(n)(c) O(n^3)(d) O(n^2)The question was posed to me in an interview.My doubt is from Quicksort topic in division Sorting of Data Structures & Algorithms II

Answer»

The correct answer is (d) O(N^2)

Easy explanation - The worst case running TIME for QUICK sort is O(n^2). In Quick sort, the worst case behaviour occurs when the partitioning routine produces two sub-arrays one with n – 1 ELEMENT and other with 0 elements.

319.

Quick sort is a __________(a) greedy algorithm(b) divide and conquer algorithm(c) dynamic programming algorithm(d) backtracking algorithmI got this question in an interview for internship.My question comes from Quicksort in chapter Sorting of Data Structures & Algorithms II

Answer»

The correct choice is (b) DIVIDE and conquer ALGORITHM

Explanation: Quick sort is a divide and conquer algorithm. Quick sort first PARTITIONS a large array into two smaller sub-arrays. And then RECURSIVELY sorts the sub-arrays.

320.

Which among the following is the best cut-off range to perform insertion sort within a quick sort?(a) N=0-5(b) N=5-20(c) N=20-30(d) N>30The question was asked in my homework.Origin of the question is Quicksort topic in division Sorting of Data Structures & Algorithms II

Answer»

The CORRECT choice is (B) N=5-20

To explain: A good cut-off range is ANYWHERE between N=5 and N=20 to avoid NASTY DEGENERATE cases.

321.

Which is the worst method of choosing a pivot element?(a) first element as pivot(b) last element as pivot(c) median-of-three partitioning(d) random element as pivotI got this question by my school principal while I was bunking the class.My doubt stems from Quicksort in chapter Sorting of Data Structures & Algorithms II

Answer»

Right ANSWER is (a) FIRST ELEMENT as PIVOT

The best I can explain: CHOOSING the first element as pivot is the worst method because if the input is pre-sorted or in reverse order, then the pivot provides a poor partition.

322.

How many sub arrays does the quick sort algorithm divide the entire array into?(a) one(b) two(c) three(d) fourThe question was asked in a job interview.My doubt is from Quicksort topic in division Sorting of Data Structures & Algorithms II

Answer»

The correct choice is (b) two

The BEST I can explain: The entire ARRAY is divided into two partitions, 1st sub array CONTAINING ELEMENTS less than the pivot element and 2ND sub array containing elements greater than the pivot element.

323.

Quick sort uses join operation rather than merge operation.(a) true(b) falseThis question was addressed to me in final exam.This is a very interesting question from Quicksort in division Sorting of Data Structures & Algorithms II

Answer»

Right answer is (a) true

The explanation is: Quick sort USES join OPERATION SINCE join is a faster operation than MERGE.

324.

Which of the following sorting algorithms is used along with quick sort to sort the sub arrays?(a) Merge sort(b) Shell sort(c) Insertion sort(d) Bubble sortThe question was posed to me in homework.My question is from Quicksort topic in portion Sorting of Data Structures & Algorithms II

Answer»

The correct ANSWER is (c) INSERTION SORT

The best explanation: Insertion sort is used along with quick sort to sort the sub arrays.

It is used only at the END.

325.

What is the average running time of a quick sort algorithm?(a) O(N^2)(b) O(N)(c) O(N log N)(d) O(log N)I had been asked this question during an interview.The above asked question is from Quicksort in division Sorting of Data Structures & Algorithms II

Answer»

Correct answer is (c) O(N log N)

For explanation: The BEST case and AVERAGE case analysis of a QUICK sort algorithm are mathematically found to be O(N log N).

326.

Which is the safest method to choose a pivot element?(a) choosing a random element as pivot(b) choosing the first element as pivot(c) choosing the last element as pivot(d) median-of-three partitioning methodI got this question in an internship interview.Question is taken from Quicksort topic in section Sorting of Data Structures & Algorithms II

Answer»

Right choice is (a) choosing a random ELEMENT as pivot

For explanation: This is the SAFEST method to choose the pivot element since it is very unlikely that a random pivot would CONSISTENTLY provide a poor PARTITION.

327.

Which of the following methods is the most effective for picking the pivot element?(a) first element(b) last element(c) median-of-three partitioning(d) random elementThe question was posed to me by my college director while I was bunking the class.My doubt is from Quicksort topic in portion Sorting of Data Structures & Algorithms II

Answer»

Correct option is (c) median-of-three partitioning

Explanation: Median-of-three partitioning is the BEST method for CHOOSING an appropriate pivot ELEMENT. Picking a first, last or random element as a pivot is not MUCH EFFECTIVE.

328.

What is the worst case time complexity of a quick sort algorithm?(a) O(N)(b) O(N log N)(c) O(N^2)(d) O(log N)I have been asked this question during an interview for a job.Origin of the question is Quicksort topic in section Sorting of Data Structures & Algorithms II

Answer»

The correct option is (c) O(N^2)

The BEST explanation: The worst CASE performance of a quick sort algorithm is MATHEMATICALLY FOUND to be O(N^2).

329.

Quick sort follows Divide-and-Conquer strategy.(a) True(b) FalseThe question was asked in exam.The origin of the question is Quicksort in division Sorting of Data Structures & Algorithms II

Answer»

Correct OPTION is (a) True

Best EXPLANATION: In quick sort, the ARRAY is DIVIDED into sub-arrays and then it is sorted (divide-and-conquer strategy).

330.

Which of the following sorting algorithms is the fastest?(a) Merge sort(b) Quick sort(c) Insertion sort(d) Shell sortThe question was posed to me in class test.The question is from Quicksort topic in portion Sorting of Data Structures & Algorithms II

Answer»

Right choice is (b) Quick sort

Easiest explanation - Quick sort is the FASTEST KNOWN sorting ALGORITHM because of its HIGHLY optimized INNER loop.

331.

What is the average time complexity of bottom up merge sort?(a) O(n log n)(b) O(n^2)(c) O(n^2 log n)(d) O(n log n^2)The question was asked by my college director while I was bunking the class.My question is based upon Sorting in division Sorting of Data Structures & Algorithms II

Answer»

The correct answer is (a) O(n log n)

Explanation: The merge function in the bottom up merge sort takes O(n) TIME which is placed inside the for LOOP. The loop RUNS for O(log n) time, thus the overall time COMPLEXITY of the CODE becomes O(n log n).

332.

What is the auxiliary space complexity of bottom up merge sort?(a) O(1)(b) O(n)(c) O(log n)(d) O(n log n)The question was posed to me during an interview.The above asked question is from Sorting in section Sorting of Data Structures & Algorithms II

Answer»

Right answer is (b) O(n)

The best EXPLANATION: The auxiliary space complexity of bottom up merge sort is same as standard merge sort as both USES the same algorithm for merging the sorted arrays which takes o(n) space. But bottom up merge sort does not NEED to maintain a CALL stack.

333.

What is the auxiliary space complexity of standard merge sort?(a) O(1)(b) O(log n)(c) O(n)(d) O(n log n)The question was posed to me during an online exam.Enquiry is from Sorting topic in section Sorting of Data Structures & Algorithms II

Answer»

Right option is (C) O(n)

Easiest explanation - The merging of two sorted arrays requires an additional SPACE of n due to which the auxiliary space REQUIREMENT of merge SORT is O(n). Thus merge sort is not an in PLACE sorting algorithm.

334.

What is the average case time complexity of standard merge sort?(a) O(n log n)(b) O(n^2)(c) O(n^2 log n)(d) O(n log n^2)This question was addressed to me during an interview for a job.My question comes from Sorting topic in division Sorting of Data Structures & Algorithms II

Answer»

Right ANSWER is (a) O(N log n)

The best I can explain: The recurrence relation for MERGE sort is given by T(n) = 2T(n/2) + n. This can be solved USING master’s THEOREM and is found equal to O(n log n).

335.

Merge sort uses which of the following algorithm to implement sorting?(a) backtracking(b) greedy algorithm(c) divide and conquer(d) dynamic programmingI have been asked this question in homework.This question is from Sorting in section Sorting of Data Structures & Algorithms II

Answer»

Correct option is (c) divide and conquer

Easy explanation - Merge sort uses the technique of divide and conquer in ORDER to sort a GIVEN array. It divides the array into two HALVES and applies merge sort algorithm to each half individually after which the SORTED versions of these halves are MERGED together.

336.

What is the space complexity of in place merge sort?(a) O(1)(b) O(n)(c) O(log n)(d) O(n log n)This question was addressed to me in semester exam.This intriguing question comes from Sorting in section Sorting of Data Structures & Algorithms II

Answer»

The correct answer is (c) O(LOG N)

Easiest explanation - Space complexity of in place version of merge sort is O(log n) which is used for storing CALL stack formed due to recursion. NOTE that the algorithms with space complexity as O(log n) also qualifies as in place algorithms as the value of log n is close to 1.

337.

What is the auxiliary space complexity of standard merge sort?(a) O(1)(b) O(log n)(c) O(n)(d) O(n log n)This question was posed to me during a job interview.My query is from Sorting in chapter Sorting of Data Structures & Algorithms II

Answer»

Correct ANSWER is (c) O(n)

Easiest EXPLANATION - The merging of two sorted arrays REQUIRES an additional space of n due to which the auxiliary space requirement of merge sort is O(n). Thus merge sort is not an in place sorting algorithm.

338.

What is the average case time complexity of standard merge sort?(a) O(n log n)(b) O(n^2)(c) O(n^2 log n)(d) O(n log n^2)The question was asked in an online quiz.This intriguing question originated from Sorting in portion Sorting of Data Structures & Algorithms II

Answer»

Right CHOICE is (a) O(n LOG n)

The best EXPLANATION: The recurrence relation for merge sort is given by T(n) = 2T(n/2) + n. This can be solved using master’s theorem and is found EQUAL to O(n log n).

339.

Merge sort uses which of the following algorithm to implement sorting?(a) backtracking(b) greedy algorithm(c) divide and conquer(d) dynamic programmingThis question was addressed to me during an interview.The question is from Sorting in section Sorting of Data Structures & Algorithms II

Answer»

Right choice is (c) divide and conquer

Easy EXPLANATION - Merge sort uses the technique of divide and conquer in order to sort a GIVEN array. It divides the array into TWO halves and APPLY merge sort ALGORITHM to each half individually after which the sorted versions of these halves are merged together.

340.

Which of the following is not a stable sorting algorithm?(a) Quick sort(b) Cocktail sort(c) Bubble sort(d) Merge sortI had been asked this question in an interview for job.Query is from Sorting topic in section Sorting of Data Structures & Algorithms II

Answer» RIGHT answer is (a) QUICK sort

The explanation is: Out of the given options quick sort is the only algorithm which is not STABLE. Merge sort is a stable SORTING algorithm.
341.

Which of the following is not in place sorting algorithm by default?(a) merge sort(b) quick sort(c) heap sort(d) insertion sortI had been asked this question during an internship interview.Origin of the question is Sorting topic in section Sorting of Data Structures & Algorithms II

Answer»

Correct choice is (a) merge sort

The best I can EXPLAIN: Quick sort, HEAP sort, and INSERTION sort are in-place sorting ALGORITHMS, whereas an additional space of O(n) is required in order to merge two SORTED arrays. Even though we have a variation of merge sort (to do in-place sorting), it is not the default option. So, among the given choices, merge sort is the most appropriate answer.

342.

Choose the incorrect statement about merge sort from the following?(a) it is a comparison based sort(b) it is an adaptive algorithm(c) it is not an in place algorithm(d) it is stable algorithmThis question was posed to me during an internship interview.This key question is from Sorting topic in chapter Sorting of Data Structures & Algorithms II

Answer» RIGHT option is (B) it is an adaptive algorithm

Explanation: Merge SORT is not an adaptive SORTING algorithm. This is because it takes O(N log n) time complexity irrespective of any case.
343.

Which of the following is not a variant of merge sort?(a) in-place merge sort(b) bottom up merge sort(c) top down merge sort(d) linear merge sortThis question was addressed to me in an interview for job.This intriguing question originated from Sorting topic in section Sorting of Data Structures & Algorithms II

Answer»

Correct choice is (d) linear merge sort

The best I can explain: In-place, top down and bottom up merge sort are different variants of merge sort. Whereas linear merge sort is not a POSSIBLE variant as it is a comparison based sort and the MINIMUM time complexity of any comparison based sort is O(N LOG n).

344.

What will be the best case time complexity of merge sort?(a) O(n log n)(b) O(n^2)(c) O(n^2 log n)(d) O(n log n^2)I had been asked this question during an internship interview.The doubt is from Sorting in portion Sorting of Data Structures & Algorithms II

Answer»

Correct ANSWER is (a) O(N log n)

For explanation: The time complexity of MERGE sort is not affected in any case as its algorithm has to implement the same number of steps. So its time complexity remains to be O(n log n) even in the best case.

345.

Which of the following method is used for sorting in merge sort?(a) merging(b) partitioning(c) selection(d) exchangingThis question was posed to me during an interview for a job.I want to ask this question from Sorting in portion Sorting of Data Structures & Algorithms II

Answer»

Right option is (a) merging

For explanation: Merge SORT algorithm divides the array into two halves and applies merge sort algorithm to each half individually after which the two SORTED halves are MERGED TOGETHER. Thus its METHOD of sorting is called merging.

346.

What is the worst case time complexity of merge sort?(a) O(n log n)(b) O(n^2)(c) O(n^2 log n)(d) O(n log n^2)This question was addressed to me during an online exam.My query is from Sorting in section Sorting of Data Structures & Algorithms II

Answer»

Correct answer is (a) O(N LOG n)

Best explanation: The time complexity of merge SORT is not affected by worst case as its algorithm has to implement the same NUMBER of steps in any case. So its time complexity remains to be O(n log n).

347.

Merge sort can be implemented using O(1) auxiliary space.(a) true(b) falseI got this question in examination.My question is from Sorting in portion Sorting of Data Structures & Algorithms II

Answer»

Correct choice is (a) true

The explanation is: Standard MERGE sort requires O(N) SPACE to merge TWO sorted arrays. We can optimize this merging process so that it takes only CONSTANT space. This version is known as in place merge sort.

348.

What is the auxiliary space complexity of merge sort?(a) O(1)(b) O(log n)(c) O(n)(d) O(n log n)The question was asked in final exam.The origin of the question is Sorting in division Sorting of Data Structures & Algorithms II

Answer»

The correct answer is (c) O(n)

The best I can explain: An additional SPACE of O(n) is required in order to MERGE TWO sorted arrays. THUS merge sort is not an in place SORTING algorithm.

349.

What is the average case time complexity of merge sort?(a) O(n log n)(b) O(n^2)(c) O(n^2 log n)(d) O(n log n^2)I had been asked this question during a job interview.This key question is from Sorting in section Sorting of Data Structures & Algorithms II

Answer»

Correct choice is (a) O(N log n)

The best I can explain: The RECURRENCE RELATION for MERGE sort is given by T(n) = 2T(n/2) + n. It is found to be equal to O(n log n) using the master theorem.

350.

Merge sort uses which of the following technique to implement sorting?(a) backtracking(b) greedy algorithm(c) divide and conquer(d) dynamic programmingThis question was addressed to me in an online quiz.My doubt stems from Sorting in division Sorting of Data Structures & Algorithms II

Answer» RIGHT answer is (c) divide and conquer

For explanation: MERGE sort uses divide and conquer in order to sort a given array. This is because it divides the array into two halves and applies merge sort algorithm to each half INDIVIDUALLY after which the two sorted halves are MERGED together.