The Gateway to Computer Science Excellence
0 votes
8 views
HEAPSORT(A)

1    BUILD-MAX-HEAP(A)
2    for i = A.length down to 2
3    exchange A[1] with A[i]
4    A.heapsize=A.heapsize – 1
5    MAX-HEAPIFY(A,1) 

illustrate the operation of HEAPSORT on the array $A=\langle 5,13,2,25,7,17,20,8,4  \rangle$

in Algorithms by Boss (41.9k points) | 8 views

Please log in or register to answer this question.

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,644 questions
56,512 answers
195,560 comments
101,074 users