Question

What is the tight asymptotic time complexity of building a binary min-heap from an unsorted array of n elements using the standard bottom-up heapify approach?

A O(n log n), since each of the n elements requires a heapify call costing O(log n)
B O(n), because the total work summed across all heapify calls forms a bounded series, not a simple n × log n product
C O(log n), since only the root element needs to be repositioned in the worst case
D O(n²), because each heapify call can cascade comparisons through every remaining element
E O(n log log n), due to the amortized cost of repeated halving during sift-down operations
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)