aboutsummaryrefslogtreecommitdiff
path: root/src/input/heap.input.pamphlet
blob: c65f5cafe414f806a5ff7d89179bd2c0f328ff80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input HEAP.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
<<*>>=

-- Input generated from HeapXmpPage
)clear all

h := heap [-4,9,11,2,7,-7]
insert!(3,h)
extract! h
h
[extract!(h) while not empty?(h)]
heapsort(x) == (empty? x => []; cons(extract!(x),heapsort x))
h1 := heap [17,-4,9,-11,2,7,-7]
heapsort h1
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}