tailieunhanh - Lecture Data structures and other objects using C++ - Chapter 10a: Complete binary trees
This lecture is an introduction to trees, illustrating basic terminology for binary trees, and focusing on complete binary. Before this lecture, students should have a good understanding of the simpler linear data structures of lists, stacks, and queues. | Chapter 10 introduces trees. This presentation illustrates the simplest kind of trees: Complete Binary Trees. Complete Binary Trees Data Structures and Other Objects Using C++ This lecture is an introduction to trees, illustrating basic terminology for binary trees, and focusing on complete binary Before this lecture, students should have a good understanding of the simpler linear data structures of lists, stacks, and queues. Binary Trees A binary tree has nodes, similar to nodes in a linked list structure. Data of one sort or another may be stored at each node. But it is the connections between the nodes which characterize a binary tree. In many ways, a tree is like the other structures you have seen: A tree consists of nodes, and each node can contain data of one sort or another. Binary Trees A binary tree has nodes, similar to nodes in a linked list structure. Data of one sort or another may be stored at each node. But it is the connections between the nodes which characterize a binary tree. An example can illustrate how the connections work But, unlike a linked list, the connections between the nodes are more than a simple one-to-another progression. An example can illustrate the connections in a binary tree. A Binary Tree of States In this example, the data contained at each node is one of the 50 states. This is an example of a binary tree with nine nodes. Presumably each node contains information about one of the 50 states. In this example, the states are not arranged in any particular order, except insofar as I need to illustrate the different special kinds of nodes and connections in a binary tree. A Binary Tree of States Each tree has a special node called its root, usually drawn at the top. The first special kind of node is the root. Computer scientists always draw this special node at the top. (I think they must have flunked botany.) A Binary Tree of States Each tree has a special node called its root, usually drawn at the top. The example tree has . | Chapter 10 introduces trees. This presentation illustrates the simplest kind of trees: Complete Binary Trees. Complete Binary Trees Data Structures and Other Objects Using C++ This lecture is an introduction to trees, illustrating basic terminology for binary trees, and focusing on complete binary Before this lecture, students should have a good understanding of the simpler linear data structures of lists, stacks, and queues. Binary Trees A binary tree has nodes, similar to nodes in a linked list structure. Data of one sort or another may be stored at each node. But it is the connections between the nodes which characterize a binary tree. In many ways, a tree is like the other structures you have seen: A tree consists of nodes, and each node can contain data of one sort or another. Binary Trees A binary tree has nodes, similar to nodes in a linked list structure. Data of one sort or another may be stored at each node. But it is the connections between the nodes which characterize a .
đang nạp các trang xem trước