...
Data-Structures
October 7, 2023
Data-Structures
October 7, 2023
Data-Structures
October 7, 2023
Data-Structures
October 7, 2023

Sorting

Question 115
Heap sort may be considered as
A
Insertion sort done on a heap data structure instead of a list.
B
Selection sort done on a heap data structure instead of a list.
C
Bubble sort done on a heap data structure instead of a list.
D
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 .
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 .
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!