100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
College aantekeningen

Lecture Notes on Lists II and Binary Trees (COMP11120)

Beoordeling
-
Verkocht
-
Pagina's
2
Geüpload op
30-05-2024
Geschreven in
2023/2024

Enhance your understanding of advanced list operations and binary trees with these comprehensive lecture notes for COMP11120. Covering essential topics such as list manipulation, traversal techniques, binary tree structures, and tree traversal algorithms, these notes are designed to provide you with a clear and concise understanding of the subject matter. Ideal for students enrolled in COMP11120 or those seeking to deepen their knowledge independently, these notes offer structured explanations, practical examples, and key insights to help you excel in your studies and exams. Get your copy now and master Lists II and Binary Trees with ease!

Meer zien Lees minder
Instelling
Vak








Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
Studie
Onbekend
Vak

Documentinformatie

Geüpload op
30 mei 2024
Aantal pagina's
2
Geschreven in
2023/2024
Type
College aantekeningen
Docent(en)
Andrea schalk
Bevat
More on lists, and introduction to binary trees

Onderwerpen

Voorbeeld van de inhoud

More on Lists, and Introduction to Binary Trees

Binary Trees

Terminology
L root
in a
binary tree every mode >
- in a full binary tree
, every node


7
has at most 2 children
. ·
is either a leaf

leaves & · or has a left and right child , which themselves are the root of a tree.


full binary tree
T 7 in a
every node

has 0 or 2 children
. - a full binary tree consists of


· either just a root mode


· or a root and a left and a right (subtree.




Full Binary Trees
Definition A full binary tree with labels from set S base Step case
: a is given
by case




basecase trees where seS tree S 7 S treeg (t t) ,
> S
,



Step case Given trees t ,
t with labels from S
, t t

treeg (t ,
tl) is a tree with labels from S
.




Example : trees (treen (troes treez) , , treed


3
#
*
-
H 04
#

3 28





FBTreess : set of all full binary trees with labels from S
.



Example Define
: operation FBTreess <
IN that returns the height of Example : Give an operation no :
FiTreess > 11I that returns the
tree number of nodes tree
a .

of a .




base case Light (trees) = D base case noltroos) =
1

Step case Light (trees (t t)) ,
= 1 + max light , light ↑
Step case no(troeg(t ,
t) = not + not + 1




Example : Show that for all to FBTroesg ,
light not Example : Show that for te FBTreesg ,
not is old




base case Light trees = 0 1 = no trees base case noltrees) = 1 which is odd


Step case
hight (treeg(t t ,
=
1 + max (lightt lightt) , ind .
hyp not , not' are odd
max(a, b) ( a + b

& 1 +
light + lightt Step case nol trees (t t) = 1 + not + not
,


not not E *

>
- 1 + + indhyp by ind .
hyp . We can find i
,
je IN such that

= no (trees (t , tl) not = 2i + 1


not =
2j + 1

L


= 1 + 2i + 1 + 2j1
= 1 + 2(i + j +
1)

=
1 + even


= odd
$7.62
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Maak kennis met de verkoper
Seller avatar
jpxoi

Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
jpxoi The University of Manchester
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
0
Lid sinds
1 jaar
Aantal volgers
0
Documenten
20
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen