Save
Trees
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
UpsetMink66259
Visit profile
Cards (7)
Binary search tree
A tree data structure in which all the nodes in the left subtree have a value less than the
root node
, and all the nodes in the right subtree have a value greater than the
root node
View source
Implementing binary search tree functions
1.
Read
and
understand
the code
2.
Execute
the code and learn how to use it
3. Implement
in-order
traversal
4. Implement
post-order
traversal
5. Implement
search
function
6. Implement
sum
function
7. Calculate time
complexity
of each function
8. Implement
remove
function
9. Implement
getRMin
helper function
View source
The activities are not meant to be totally
finished
during the lab session
View source
The code starts with a
BST
already constructed, but the user can change it to start with an
empty tree
and insert their own nodes
View source
The traversals In-Order and
Post-Order
and the function
remove()
are already included in the menu, but they are not implemented yet
View source
The
remove()
function must take care of
three
different situations
View source
The
getRMin()
function gets the
leftmost
child of the right node
View source
See similar decks
2.5 Trees
AQA A-Level Computer Science > 2.0 Fundamentals of data structures
52 cards
6.4.2 Evolutionary Trees
AQA GCSE Biology > Unit 6: Inheritance, Variation, and Evolution > 6.4 Classification of Living Organisms
26 cards
3.3.3 Decision Trees
Edexcel A-Level Business > Theme 3: Business Decisions and Strategy > 3.3 Decision-Making Techniques
39 cards
6.4.2 Evolutionary Trees
GCSE Biology > Unit 6: Inheritance, Variation, and Evolution > 6.4 Classification of Living Organisms
44 cards
Trees
6 cards
Trees
29 cards
Trees
11 cards
Trees
Fundamentals of Data Structures
32 cards
Trees
17 cards
Trees
ADS
59 cards
Trees
Computer Science Paper 2
9 cards
Trees
OCR Computer Science A-Level > Paper 1 > Data Types, Data Structures and Algorithms > Data Structures
40 cards
trees
notrn > comp sci > SLR14
12 cards
Trees
Computer Science > Algorithms > Algorithms for the Main Data Structures
88 cards
Trees, Binary Trees, Traversal
9 cards
trees
55 cards
trees
10 cards
trees
computing > p1 > data structures
23 cards
Trees
A levels > BUSINESS > UNIT 2 > management, leadership and decision making > Decision
10 cards
Trees
A-Levels > Computer Science > Unit 2 > Algorithms for main data structures
1 card
Trees
75 cards