GATE CSE
First time here? Checkout the FAQ!
x
0 votes
22 views

An array of integers of size n can be converted into a heap by adjusting the heaps rooted at each internal node of the complete binary tree starting at the node ⌊(n - 1) /2⌋, and doing this adjustment up to the root node (root node is at index 0) in the order ⌊(n - 1)/2⌋, ⌊(n - 3)/ 2⌋, ....., 0. The time required to construct a heap in this manner is

  1. O(log n)
  2. O(n)
  3. O (n log log n)
  4. O(n log n)

I dont get what question meant

can ny implemented on following array

1,2,3,4,5 ?

asked in DS by Active (1.9k points)   | 22 views
it is a GATE question.rt?

By built heap method it will take O(N) time
ya i know that

but u can implement it  on  taking given array .

Please log in or register to answer this question.

Related questions

0 votes
1 answer
1
asked in DS by Sahil Gupta Active (1.5k points)   | 94 views
Top Users Jan 2017
  1. Debashish Deka

    9534 Points

  2. sudsho

    5554 Points

  3. Habibkhan

    4878 Points

  4. Bikram

    4774 Points

  5. Vijay Thakur

    4498 Points

  6. Arjun

    4398 Points

  7. saurabh rai

    4236 Points

  8. Sushant Gokhale

    4112 Points

  9. Kapil

    3826 Points

  10. santhoshdevulapally

    3808 Points

Monthly Topper: Rs. 500 gift card

19,355 questions
24,199 answers
53,808 comments
20,368 users