File: intro.tex

package info (click to toggle)
spooles 2.2-11
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 19,656 kB
  • ctags: 3,690
  • sloc: ansic: 146,836; sh: 7,571; csh: 3,615; makefile: 1,968; perl: 74
file content (12 lines) | stat: -rw-r--r-- 586 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
\chapter{{\tt IIheap}: 
% \break (Integer Key, Integer Value) Heap}
(Key, Value) Heap}
\par
The {\tt IIheap} is a object that manages a heap of data.
Both the {\it key} and the {\it value} are of type {\tt int}.
The heap has fixed size, each item must be in {\tt [0,maxsize-1]},
where {\tt maxsize} is set on initialization.
The {\tt IIheap} object requires three vectors of size {\tt maxsize}.
Three methods are supported: {\it find\_min}, {\it insert} and {\it
delete} which take $O(1)$, $O(\log_2 n)$ and $O(\log_2 n)$ time, 
respectively, where $n$ is the present size of the heap.