1
You visited us
1
times! Enjoying our articles?
Unlock Full Access!
Byju's Answer
Standard VII
Mathematics
Properties of Addition and Subtraction of Integers
Which one of ...
Question
Which one of the following array represents a binary max-heap?
A
[26, 15, 14, 17, 11, 9, 13]
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
[26, 13, 17, 14, 11, 9, 15]
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
[26, 15, 17, 14, 11, 9, 13]
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
[26, 15, 13, 14, 11, 9, 17]
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is
C
[26, 15, 17, 14, 11, 9, 13]
For max heap we will compare parent node (i) with its left-child
(
2
×
i
)
and right child
(
2
×
i
+
1
)
;
In first option node (2) < node (5) which is violating the max-heap property.
In second option node (2) < node (5) which is violating the max-heap property.
In third option there is no violation.
In fourth option node (3) < node (7) which is violating the max-heap property.
Suggest Corrections
1
Similar questions
Q.
Consider the process of inserting an element into a Max Heap, where the Max Heap is represented by an array. Suppose we perform a binary search on the path from the new leaf to the root to find the position for the newly inserted element, the number of comparisons performed is
Q.
In a binary max heap containing n numbers, the smallest element can be found in time
Q.
Which of the following is a valid max heap?
Q.
Consider
the
binary
min
heap
given
below
:
(
min
heap
is
a
binary
tree
where
each
node
in
a
tree
has
a
key
which
is
less
than
or
equal
to
the
key
of
its
children
)
Insert
the
key
1
in
above
min
heap
which
of
the
following
is
the
resulant
min
heap
after
two
delete
operations
?
Q.
A binary min heap consisting of integers is implemented using array A[l ....n] in which root node is stored at A[1] and locations A[l] through A[n] store the 'n' integer values in the heap. The minimum number of comparisons required to find maximum element in a min heap of 99 elements is
View More
Join BYJU'S Learning Program
Grade/Exam
1st Grade
2nd Grade
3rd Grade
4th Grade
5th Grade
6th grade
7th grade
8th Grade
9th Grade
10th Grade
11th Grade
12th Grade
Submit
Related Videos
Properties of Addition and Subtraction of Integers
MATHEMATICS
Watch in App
Explore more
Properties of Addition and Subtraction of Integers
Standard VII Mathematics
Join BYJU'S Learning Program
Grade/Exam
1st Grade
2nd Grade
3rd Grade
4th Grade
5th Grade
6th grade
7th grade
8th Grade
9th Grade
10th Grade
11th Grade
12th Grade
Submit
AI Tutor
Textbooks
Question Papers
Install app