The Gateway to Computer Science Excellence
0 votes
46 views
Is an array that is in sorted order a min-heap ?
in Algorithms by
retagged by | 46 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
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
52,315 questions
60,438 answers
201,786 comments
95,269 users