2 votes 2 votes What is the best case complexity in building a min-heap? $\Theta(n\log n)$ $\Theta(n^2)$ $O(\log n)$ $O(n)$ Algorithms go2025-mix-2 binary-heap + – gatecse asked Aug 30, 2020 gatecse 63 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes The time complexity will be $O(n)$ for building min-heap. So, the correct answer is $(D).$ References: https://www.growingwiththeweb.com/data-structures/binary-heap/build-heap-proof/ https://stackoverflow.com/questions/9755721/how-can-building-a-heap-be-on-time-complexity https://ict.iitk.ac.in/wp-content/uploads/CS210-Data-Structures-Module-29-Binary-Heap-II.pdf Lakshman Bhaiya answered Sep 1, 2020 Lakshman Bhaiya comment Share Follow See all 0 reply Please log in or register to add a comment.