• Home
  • University of the People
  • Data Structures (proctored course) CS 3303
  • Data Structures

Data Structures

CS 3303-01 Data Structures - AY2022-T5 Dashboard My courses CS 3303-01 - AY2022-T5 7 July - 13 July Learning Guide Unit 4 Learning Guide Unit 4 Unit 4 Learning Guide Overview Unit 4: Binary Trees Topics: The Full Binary Tree Theorem Traversals Binary Tree Implementations o Pointer-based node implementation o Array Implementation Search trees, Heaps, and Priority queues Huffman Coding Trees Learning Objectives: Be able to define and understand the characteristics, notation, and structure of binary trees and understand the Full Binary Tree Theory and the extension to this theorem. Understand different approaches to tree traversals including enumeration, preorder transversal and post-order traversal. Understand and be able to implement binary tree nodes using: o Pointer-base node implementation o Understand the impact of overhead and space required to maintain the structure of a binary tree o Array implementations for complete binary trees Understand and be able to utilize Binary Search trees and be able to review and be able to understand the implementation of binary trees as Heaps and Priority queues Be able to define the characteristics of Huffman Coding Trees and how they are used. Introduction Binary trees are used extensively within the computer industry. So what is a binary tree? One way to visualize a binary tree is to think about a tree which has exactly two branches that grow off of the trunk and every branch on the tree has no more than two braches off of it. The word binary refers to the binary number system which has only two digits ... 0 and 1 which is why the term binary is used to describe a binary tree as it can only have up to 2 branches. The following figure provides an overview of binary tree terminology representing the tree structure with lettered circles connected by lines. The circles are referred to as nodes and the lines as the path Binary Tree Terminology Root B and C are sub-trees of A B,C,D,and Eare Internal Nodes A is the ancestor of B B is the descendent of A B and C Children nodes of A Linkages to a particular node is the path Depth of Dis 2, Depth of A is 0 Height of this tree is 4 Leaf node is any node that has no Children H,I,J,F,and G Binary trees have many applications in computer science. One popular usage of binary trees is in searches. Imagine that you needed to find some information quickly. We could create a list that contained the information that we were looking for and then search the list. To search a list, we typically must begin by examining the first item in the list and then repeating this process for each subsequent item in the list until we found the one that we were looking for. If the item that we needed happened to be the first one in the list then the search would be very quick. However, if the item that we were looking for was the list item i