The Gateway to Computer Science Excellence
0 votes
Is an array that is in sorted order a min-heap ?
in Algorithms by Boss (41.9k points)
retagged by | 33 views

1 Answer

0 votes
If the array is sorted in non-decreasing order, then yes it is a min heap. It follows straight from the definition of a min heap.
by Loyal (6.5k points)
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
50,647 questions
56,479 answers
100,559 users