GATE CSE
First time here? Checkout the FAQ!
x
+1 vote
141 views
Why space complexity of heapsort is O(1)....and why not O(logn)..because of space required by recursion calls which is equivalent to height of the tree...where am i getting wrong plz help...
asked in Algorithms by (245 points)   | 141 views
I think auxillary space required will be O(1) but no total space complexity,not sure.

1 Answer

0 votes
answered by Boss (5.3k points)  
I have already seen this answer. But I am still not getting why space required by recursion calls is not considered.
very nice question. i have the same doubt.. It should be log n because every time we are calling  heapify on the root of tree?  experts advice needed...............

Related questions

+2 votes
2 answers
2
asked in Algorithms by Kapil Veteran (41.1k points)   | 291 views
Top Users Jan 2017
  1. Debashish Deka

    9830 Points

  2. sudsho

    5596 Points

  3. Bikram

    5330 Points

  4. Habibkhan

    5202 Points

  5. Vijay Thakur

    4508 Points

  6. Arjun

    4458 Points

  7. Sushant Gokhale

    4410 Points

  8. saurabh rai

    4236 Points

  9. santhoshdevulapally

    3896 Points

  10. Kapil

    3848 Points

Monthly Topper: Rs. 500 gift card

19,469 questions
24,254 answers
54,159 comments
20,400 users