Clausal Language (ver. 5.81.16, by P.J. Voda, J. Komara, J. Kluka)
7. CVICENIE Z PREDMETU 1-INF-465 DEKLARATIVNE PROGRAMOVANIE
|
|
Meno:
Verzia CL: 5.81.16
Datum: utorok 28.3.2006
WWW: http://www.ii.fmph.uniba.sk/cl/view.php/courses/1-INF-465-dp/0506ls/?lang=sk
Kontakt: mailto:komara@nw.fmph.uniba.sk
|
|
Uvodna poznamka. Toto cvicenie je venovane binarnym stromom.
-
Subor mtex.cl obsahuju makra pre CL-TeX.
-
Subor(y) maux*.cl obsahuju definicie pomocnych funkcii a predikatov.
-
Subor(y) ex08*.cl obsahuju ulohy, ktore mate riesit na tomto cviceni.
Tieto subory sa musia skompilovat v spravnom poradi; presny postup je uvedeny
v subore readme.txt .
|
|
******************************************************************************
********************************* EXERCISES **********************************
******************************************************************************
|
|
Chapter. Programs Operating on Trees.
|
|
Section. Binary Search Trees.
|
|
|
|
|
|
|
|
Membership in binary search trees. Define the predicate
such that
|
|
Minimal element in a binary search tree. Define the function
such that
|
|
Maximal element in a binary search tree. Define the function
such that
|
|
Deletion of the minimal element in a binary search tree. Define the
function
such that
|
|
Deletion of the maximal element in a binary search tree. Define the
function
such that
|
|
Insertion in binary search trees. Define the function
such that
|
|
Join of two binary search trees. Define the function
such that
where
|
|
Deletion in binary search trees. Define the function
such that
|
|
Heap used: 344608 free: 133872008
Time used: 0:0:0:13