The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
136 views

Since Heapify is a recursive function, its space complexity is $O(logn)$ because of the stack space required for recursion.
I also read that space complexity of heapsort is $O(1)$ beause of the explanation here - https://gateoverflow.in/79909/space-complexity-of-heap-sort .

So my question is why the space complexity of Build Heap is $O(logn)$ ?

If space complexity of build heap is $O(logn)$ then heapsorts complexity should also be the same . What am I missing here ?

asked in Algorithms by (97 points)
edited by | 136 views

Please log in or register to answer this question.

Related questions

+2 votes
0 answers
6


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

47,003 questions
51,323 answers
177,491 comments
66,668 users