0% found this document useful (0 votes)
269 views6 pages

Quiz About Top MCQs On Sorting Algorithms With Answers

The document contains a quiz with multiple-choice questions focused on sorting algorithms, including QuickSort, Merge Sort, and Heap Sort. Each question addresses different aspects of sorting algorithms, such as time complexity and stability. The quiz is designed for individuals looking to test their knowledge in data structures and algorithms, specifically in sorting techniques.

Uploaded by

Chen Feng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
269 views6 pages

Quiz About Top MCQs On Sorting Algorithms With Answers

The document contains a quiz with multiple-choice questions focused on sorting algorithms, including QuickSort, Merge Sort, and Heap Sort. Each question addresses different aspects of sorting algorithms, such as time complexity and stability. The quiz is designed for individuals looking to test their knowledge in data structures and algorithms, specifically in sorting techniques.

Uploaded by

Chen Feng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Courses Tutorials DSA Data Science Web Tech Sign In

Trending Now Data Structures Algorithms System Design Foundational Courses Data Science Practice Problem Python Machine Learning

Top MCQs on Sorting


Algorithms with Answers
Last Updated : Mar 19, 2024 Discuss

Question 1

What is recurrence for worst case of


QuickSort and what is the time complexity in
Worst case?

Recurrence is T(n) = T(n-2) + O(n) and


A
time complexity is O(n^2)

Recurrence is T(n) = T(n-1) + O(n) and


B
time complexity is O(n^2)

Recurrence is T(n) = 2T(n/2) + O(n) and


C
time complexity is O(nLogn)

Recurrence is T(n) = T(n/10) + T(9n/10)


D
+ O(n) and time complexity is O(nLogn)

Discuss it

IMPORTANT SAFETY
INFORMATION
Question 2
Do not use COSENTYX if

Suppose we have an O(n) time algorithm that


finds the median of an unsorted array. Now
consider a QuickSort implementation where
we first find the median using the above
algorithm, then use the median as a pivot.
What will be the worst-case time complexity
of this modified QuickSort?

A O(n^2 Logn)

B O(n^2)

C O(n Logn Logn)

D O(nLogn)

Discuss it

https://www.geeksforgeeks.org/quizzes/top-mcqs-on-sorting-algorithms-with-answers/?ref=shm 3/19/25, 3 00 PM
Page 1 of 6
:
Question 3 The Easiest Way to Buy Direct
Visit ADI’s eShop Today

Which of the following is not a stable sorting


algorithm in its typical implementation.

A Insertion Sort

B Merge Sort
The Easiest Way to SSSho
ho
hoppp N
Now
Now
ow
Buy Direct C Quick Sort
Visit ADI’s eShop Today
D Bubble Sort

Discuss it

Question 4

Which of the following sorting algorithms in


its typical implementation gives best
performance when applied on an array which
is sorted or almost sorted (maximum 1 or two
Shop
SShop
hop Now
N ow
elements are misplaced).

A Quick Sort

B Heap Sort

C Merge Sort

D Insertion Sort

Discuss it
Click Here for More
Information
Don't miss this content from our sponsor
Question 5

Suppose we are sorting an array of eight


integers using quicksort, and we have just
finished the first partitioning with the array
looking like this:

2 5 1 7 9 12 11 10

Click Here for More


Which statement is correct? Information
Don't miss this content from our sponsor
A The pivot could be either the 7 or the 9.

The pivot could be the 7, but it is not

https://www.geeksforgeeks.org/quizzes/top-mcqs-on-sorting-algorithms-with-answers/?ref=shm 3/19/25, 3 00 PM
Page 2 of 6
:
The pivot could be the 7, but it is not
B
the 9

The pivot is not the 7, but it could be


C
the 9
MAX25605
D Neither the 7 nor the 9 is the pivot. 6-Switch Sequential LED
Controller For Automotive
Lighting Systems
Discuss it
Sample Now

Question 6

Suppose we are sorting an array of eight


integers using heapsort, and we have just
finished some heapify (either maxheapify or
minheapify) operations. The array now looks
like this: 16 14 15 10 12 27 28 How many
heapify operations have been performed on
root of heap?

A 1

B 2

C 3 or 4

D 5 or 6

Discuss it

Question 7

What is the best time complexity of bubble


sort(optimised)?

A N^2

B NlogN

C N

D N(logN)^2

Discuss it

https://www.geeksforgeeks.org/quizzes/top-mcqs-on-sorting-algorithms-with-answers/?ref=shm 3/19/25, 3 00 PM
Page 3 of 6
:
Question 8

You have to sort 1 GB of data with only 100


MB of available main memory. Which sorting
technique will be most appropriate?

A Heap sort

B Merge sort

C Quick sort

D Insertion sort

Discuss it

Question 9

In a modified merge sort, the input array is

splitted at a position one-third of the


length(N) of the array. Which of the following
is the tightest upper bound on time
complexity of this modified Merge Sort.

A N(logN base 3)

B N(logN base 2/3)

C N(logN base 1/3)

D N(logN base 3/2)

Discuss it

Question 10

Which sorting algorithm will take least time


when all elements of input array are
identical? Consider typical implementations
of sorting algorithms.

A Insertion Sort

B Heap Sort

C Merge Sort

https://www.geeksforgeeks.org/quizzes/top-mcqs-on-sorting-algorithms-with-answers/?ref=shm 3/19/25, 3 00 PM
Page 4 of 6
:
C Merge Sort

D Selection Sort

Discuss it

Master DSA and also get 90% fee refund on


completing 90% course in 90 days! Take the Three 90
Challenge today.
Step into the Three 90 Challenge – 90 days to push
limits, break barriers, and become the best version of
yourself! Don't miss your chance to upskill and get
90% refund. What more motivation do you need? Start
the challenge right away!

Tags: DSA Quiz

There are 31 questions to complete.

Take a part in the


View All Discussion
ongoing discussion

https://www.geeksforgeeks.org/quizzes/top-mcqs-on-sorting-algorithms-with-answers/?ref=shm 3/19/25, 3 00 PM
Page 5 of 6
:
Company Languages DSA Data Web Python
About Us Python Data Science & Technologies Tutorial
Corporate & Communications Legal Java Structures
ML HTML Python
Privacy Policy C++ Algorithms
Address: Data Science CSS Programming
In Media PHP DSA for
A-143, 7th Floor, Sovereign With Python JavaScript Examples
Corporate Tower, Sector- 136, Contact Us GoLang Beginners
Data Science TypeScript Python Projects
Noida, Uttar Pradesh Advertise with SQL Basic DSA
For Beginner ReactJS Python Tkinter
(201305) us R Language Problems
Machine NextJS Web Scraping
GFG Corporate Android DSA
Registered Address: Learning Bootstrap OpenCV Tutorial
Solution Tutorial Roadmap
ML Maths Web Design Python Interview
K 061, Tower K, Gulshan Placement Tutorials Top 100 Question
Vivante Apartment, Sector Data
137, Noida, Gautam Buddh Training Archive DSA
Visualisation Django
Nagar, Uttar Pradesh, 201305 Program Interview
Pandas
GeeksforGeeks Problems
NumPy
Community DSA
NLP
Roadmap
Deep Learning
by
Sandeep
Jain
All Cheat
Advertise with us Sheets

Computer DevOps System Inteview School GeeksforGeeks


Science Git Design Preparation Subjects Videos
Operating Linux High Level Competitive Mathematics DSA
Systems AWS Design Programming Physics Python
Computer Docker Low Level Top DS or Algo Chemistry Java
Network Kubernetes Design for CP Biology C++
Database Azure UML Company-Wise Social Science Web Development
Management GCP Diagrams Recruitment English Data Science
System DevOps Interview Process Grammar CS Subjects
So!ware Roadmap Guide Company-Wise Commerce
Engineering Design Preparation World GK
Digital Logic Patterns Aptitude
Design OOAD Preparation
Engineering System Puzzles
Maths Design
So!ware Bootcamp
Development Interview
So!ware Questions
Testing

@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved

https://www.geeksforgeeks.org/quizzes/top-mcqs-on-sorting-algorithms-with-answers/?ref=shm 3/19/25, 3 00 PM
Page 6 of 6
:

You might also like