Data Structures & Programming Binary Trees

Published  . 0 views
↓ Download
Data Structures & Programming Binary Trees
1 / 1
Data Structures & Programming Binary Trees - slide 1 of 20 Data Structures & Programming Binary Trees - slide 2 of 20 Data Structures & Programming Binary Trees - slide 3 of 20 Data Structures & Programming Binary Trees - slide 4 of 20 Data Structures & Programming Binary Trees - slide 5 of 20 Data Structures & Programming Binary Trees - slide 6 of 20 Data Structures & Programming Binary Trees - slide 7 of 20 Data Structures & Programming Binary Trees - slide 8 of 20 Data Structures & Programming Binary Trees - slide 9 of 20 Data Structures & Programming Binary Trees - slide 10 of 20 Data Structures & Programming Binary Trees - slide 11 of 20 Data Structures & Programming Binary Trees - slide 12 of 20 Data Structures & Programming Binary Trees - slide 13 of 20 Data Structures & Programming Binary Trees - slide 14 of 20 Data Structures & Programming Binary Trees - slide 15 of 20 Data Structures & Programming Binary Trees - slide 16 of 20 Data Structures & Programming Binary Trees - slide 17 of 20 Data Structures & Programming Binary Trees - slide 18 of 20 Data Structures & Programming Binary Trees - slide 19 of 20 Data Structures & Programming Binary Trees - slide 20 of 20
Description: Data Structures Programming Binary Trees Definitions Linked Structures Golnar Sheikhshab Binary Tree Definitions Root Left child, Right child Left subtree, Right subtree Proper, improper Full Complete Recursive Binary Tree Definition: a

Related Topics

Download Presentation

"Data Structures & Programming Binary Trees" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

slide1. Data Structures & Programming Binary Trees
Definitions & Linked Structures

Golnar Sheikhshab<br>
slide2. Binary Tree Definitions Root
Left child, Right child
Left subtree, Right subtree
Proper, improper
Full
Complete
Recursive Binary Tree Definition:
a binary tree is either empty or consists of:
A node r, called the root of T and storing an element
A binary tree, called the left subtree of T
A binary tree, called the right subtree of T ‹#›<br>
slide3. Binary Tree Examples ‹#›<br>
slide4. Binary Tree Informal Interface ‹#›<br>
slide5. Properties of Binary Trees ‹#›<br>
slide6. Properties of Binary Trees (2) ‹#›<br>
slide7. ‹#›<br>
slide8. A Linked Structure for Binary Trees ‹#›<br>
slide9. Some C++ Code from the Textbook! (Do I sound impressed?) ‹#›<br>
slide10. ‹#›<br>
slide11. ‹#›<br>
slide12. ‹#›<br>
slide13. ‹#›<br>
slide14. ‹#›<br>
slide15. ‹#›<br>
slide16. ‹#›<br>
slide17. Complexity Analysis ‹#›<br>
slide18. ADT Tree is not nearly as standard as stack & queue People define insert and remove according to their problem
Do I need to insert to
any position?
only root?
only leaves?
What do I do if it's a binary tree and the node already has both left and right?
Do I need to remove from
any position?
only root?
only leaves?
What do I do with the children of a node that I am removing? ‹#›<br>
slide19. Constructing a tree How do I decide
what I'm putting in a tree?
with what structure?
From file?
With some logic? Did the code from your book enables me to do what I need to do? Did your book implement tree as a data structure? Can you change the code of gTree.h from lab4 to make a binary tree? Would that code enable you to fill a tree from a file? If yes, what are the assumptions? What if you want to fill a tree based on some logic (like in the assignment 3)? ‹#›<br>
slide20. Reading material Sections 7.3.1, 7.3.2, 7.3.3, and 7.3.4 of the textbook ‹#›<br>