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)
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
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-text-image.webp)
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Step: 3
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started