Question 17406 – ISRO CS-2023
February 7, 2024
Question 17409 – ISRO CS-2023
February 7, 2024
Question 17406 – ISRO CS-2023
February 7, 2024
Question 17409 – ISRO CS-2023
February 7, 2024

Question 17407 – ISRO CS-2023

Worst case time complexity of heap sort for n elements

Correct Answer: A

Question 6 Explanation: 
Heap Sort has a time complexity of O(n log n) in the worst case because it builds a max-heap or min-heap (depending on whether it’s sorting in ascending or descending order) and performs n iterations (heapify) for n elements.
Each heapify operation takes O(log n) time in the worst case.
A
O(nlogn)
B
O(logn)
C
O(n2)

D
O(n)
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!!