Question
1) For the following question, how will the array elements look like after second pass of Insertion sort? 34, 8, 64, 51, 32, 21 8,
1) For the following question, how will the array elements look like after second pass of Insertion sort? 34, 8, 64, 51, 32, 21
8, 21, 32, 34, 51, 64
8, 32, 34, 51, 64, 21
8, 34, 51, 64, 32, 21
8, 34, 64, 51, 32, 21
2)
What is the disadvantage of selection sort?
It requires auxiliary memory
It is not scalable
It can be used for small keys
It takes linear time to sort the elements
3)
Which of the following is an advantage of optimized bubble sort over other sorting techniques in case of sorted elements?
Detects whether the input is already sorted
Consumes less memory
It is faster
Consumes less time
4)
What is the auxiliary space complexity of merge sort?
O(n log n)
O(n)
O(log n)
O(1)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started