UGC NET CS 2023Data Structures and Algorithms › Data StructuresVerified
UGC NET CS 2023 PYQ: Consider the following statements about heap sort algorithm: The MAX-HEAPIFY procedure which runs in…
Consider the following statements about heap sort algorithm:
- The MAX-HEAPIFY procedure which runs in $\mathrm{O} \lg (n)$ time, is the key to maintaining the max heap property
- The BUILD-MAX-HEAP procedure, which runs in $\mathrm{O} \lg (n)$ time, produces max-heap from an unordered input array
- The MAX-HEAP-INSERT, which runs in $\text{O}$ $(\lg n)$ time, implements the insertion operation
- The HEAP-INCREASE-KEY procedure runs in $\text{O}$ $(\mathrm{n} \lg n)$ time , to set the key of new node of its correct value
Choose the correct answer from the options given below:
- A$\text{I, II}$ only
- B$\text{I, III}$ onlyCorrect answer
- C$\text{II, IV}$ only
- D$\text{I, II, III, IV}$
Answer
(B) $\text{I, III}$ only
Approach
Recall the standard CLRS running times of the heap operations and check each statement.
Reviewed by UGC IQ Editorial Team.