Data-Structures
October 7, 2023Data-Structures
October 7, 2023Sorting
Question 115 |
Heap sort may be considered as
Insertion sort done on a heap data structure instead of a list. | |
Selection sort done on a heap data structure instead of a list. | |
Bubble sort done on a heap data structure instead of a list. | |
None of the above. |
Question 115 Explanation:
When we do min or max heapify in heap sort, we get the min or max element in the root then we exchange it with the last element. And we repeat the procedure for the remaining element .
We do similar type in selection sort,we find min or max element and then we exchange that element with first element and we repeat the element with the remaining procedure .
We do similar type in selection sort,we find min or max element and then we exchange that element with first element and we repeat the element with the remaining procedure .
Correct Answer: B
Question 115 Explanation:
When we do min or max heapify in heap sort, we get the min or max element in the root then we exchange it with the last element. And we repeat the procedure for the remaining element .
We do similar type in selection sort,we find min or max element and then we exchange that element with first element and we repeat the element with the remaining procedure .
We do similar type in selection sort,we find min or max element and then we exchange that element with first element and we repeat the element with the remaining procedure .
Subscribe
Login
0 Comments