Homechevron_rightEngineeringchevron_rightComputer Sciencechevron_rightData Structurechevron_rightIf we implement heap as maximum heap , adding a new node of value 15 t...

If we implement heap as maximum heap , adding a new node of value 15 t...

  • Q. If we implement heap as maximum heap , adding a new node of value 15 to the left most node of right subtree . What value will be at leaf nodes of the right subtree of the heap.

    data-structure-questions-answers-heap-q7
  • filter_dramaExplanation
    Answer is : A
    None.

Discussion

    No one started the discussion yet. Break the ice and start the conversation.
    Please Login to be part of the discussion.

Similar Questions

  • 1. What will be the order of new heap created after union of heap H1 and H2 when created by the following code. Initially both are of the order n.

    FIB_UNION(H1,H2)
     {
      H =MAKE_HEAP()
      min[H]= min[H1]
      concatenate the root list of H2 with the root list of H
      if (min[H1] = NIL) or (min[H2]!= NIL and min[H2] < min[H1])
      then min[H] = min[H2]
      n[H]=  n[H1] + n[H2]
      free the objects H1 and H2
      return H
     }
  • filter_dramaExplanation
    Answer is : A
    None.
  • 2. Why is heap implemented using array representations than tree(linked list) representations though both tree representations and heaps have same complexities?

    for binary heap

    -insert: O(log n)

    -delete min: O(log n)

    for a tree

    -insert: O(log n)

    -delete: O(log n)

    Then why go with array representation when both are having same values ?
  • filter_dramaExplanation
    Answer is : D
    None.
  • 3. What is order of resultant heap after merging two tree of order k?
  • filter_dramaExplanation
    Answer is : B
    None.
  • 4. The main distinguishable characterstic of a binomial heap from a binary heap is that
  • filter_dramaExplanation
    Answer is : A
    None.
  • 5. What is the other name of weak heap?
  • filter_dramaExplanation
    Answer is : C
    None.

Data StructureTopics

leaderboardLeaderboard
  • Rahul Kumar

    191 Points

  • VIKRAM JEET

    54 Points

  • GEETHIKA CHOWDARY

    53 Points

  • sunita saini

    52 Points

  • Zain

    49 Points