This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:fall2016:data:projects:dlt0 [2016/11/15 13:41] – [Project: Tree part of EOCE0] wedge | haas:fall2016:data:projects:dlt0 [2016/12/02 19:31] (current) – [Errata] wedge | ||
---|---|---|---|
Line 11: | Line 11: | ||
This section will document any updates applied to the project since original release: | This section will document any updates applied to the project since original release: | ||
- | * __revision | + | * __revision |
+ | * __revision 2__: typo in mktree unit test. FIXED. (20161117) | ||
+ | * __revision 3__: typo in grabnode unit test. FIXED. (20161202) | ||
=====Objective===== | =====Objective===== | ||
In this project, we continue our conceptual journey and explore yet another data structure: trees. | In this project, we continue our conceptual journey and explore yet another data structure: trees. | ||
Line 36: | Line 37: | ||
As we will be placing nodes in the tree according to their stored values (lesser values go to the left, or prior; greater values go to the right, or after), our tree will naturally sort our data for us, allowing us to search through its contents quite advantageously. As such, the tree we will be implementing is also known as a //binary search tree//. | As we will be placing nodes in the tree according to their stored values (lesser values go to the left, or prior; greater values go to the right, or after), our tree will naturally sort our data for us, allowing us to search through its contents quite advantageously. As such, the tree we will be implementing is also known as a //binary search tree//. | ||
+ | ====traversal==== | ||
+ | There are 3 common methods of tree traversal we will explore with respect to trees. | ||
+ | |||
+ | Our definitions may differ slightly from definitions found elsewhere, but that's okay! Just a little abstraction at play. | ||
+ | |||
+ | The three methods of traversal are: | ||
+ | |||
+ | * preorder: back, parent, there | ||
+ | * postorder: there, parent, back | ||
+ | * inorder: parent, back, there | ||
+ | |||
====tree height can matter==== | ====tree height can matter==== | ||