Koofers

Lecture Notes for CMSC 132 - OBJECT-ORIENTED PROG II with Padua-Perez at Maryland (UMD)

Notes Information

Material Type:Class Note
Professor:Padua-Perez
Class:CMSC 132 - OBJECT-ORIENTED PROG II
Subject:Computer Science
University:University of Maryland
Term:--
Keywords:
  • On the Left
  • On the Right
  • Binary Search
  • Polymorphic
  • Relationship
  • Largest Value
  • Design-Build
  • Hierarchical
  • Principles of Design
  • Implementation
Login / Sign Up to View Document
Preview Page 1Preview Page 2Preview Page 3Preview Page 4Preview Page 5Preview Page 6

Sample Document Text

1 CMSC 132: Object-Oriented Programming II Trees & Binary Search Trees Department of Computer Science University of Maryland, College Park Trees Trees are hierarchical data structures One-to-many relationship between elements Tree node / element Contains data Referred to by only 1 (parent) node Contains links to any number of (children) nodes Parent node Children nodes Trees Terminology Root ? node with no parent Leaf ? all nodes with no children Interior ? all nodes with children Root node Leaf nodes Interior nodes Trees Terminology Sibling ? node with same parent Descendent ? children nodes & their descendents Subtree ? portion of tree that is a tree by itself ? a node and its descendents Subtree Siblings Trees Terminology Level ? is a measure of a node's distance from root Definition of level If node is the root of the tree, its level is 1 Else, the node's level is 1 + its parent's level Height (depth) ? max level of any node in tree Height = 3 Binary Tre...

Related Documents

Possible Classes Exam
Possible Classes Exam
Possible Classes Exam
Cmsc 132 Quiz Quiz
Problem Description Exam
Factory Pattern Exam
Problem Description Exam
Unauthorized Exam
Binary Search Notes
Network Connections Exam
Simple Rules Exam
Unauthorized Exam
Problem Description Exam
Following Values Exam
Unauthorized Exam
Method Return Quiz
155, "/var/app/current/tmp/"