Sect 8. Tree CONCEPTS Tree, root, subtree, ordered tree Terminology: parent, child, ancestor, descendant, sibling, branch, leaf Binary tree, left/right child, full, Level, height Binary search tree, insertion, deletion Decision tree Huffman codes Traversals: preorder, postorder, inorder Expression notation: infix, Polish, evaluation NOTATION SKILLS 1. Identify concepts in a context E.g., tell children, ancestors, etc, of a node in a tree E.g., tell whether a traversal is pre/post/inorder 2. Manipulate trees E.g., transform tree into binary and vice versa E.g., insert/remove nodes in binary search trees 3. Use trees in problems E.g., build decision trees, reason about complexity E.g., build Huffman codes of language E.g., transform infix to Polish notations and vice versa E.r., evaluate Polish notation expressions SOURCES Tutorialspoint: Introduction to trees https://www.tutorialspoint.com/discrete_mathematics/introduction_to_trees.htm Wikipedia: Binary expression tree https://en.wikipedia.org/wiki/Binary_expression_tree *** Recommended *** Youtube: Binary Search Trees (BSTs) - Insert and Remove Explained, by Colleen Lewis https://www.youtube.com/watch?v=wcIRPqTR3Kc Youtube: Binary tree traversal, by AlgoGeeks https://www.youtube.com/watch?v=GsrPQ32sPTI Youtube: Binary Tree Traversal (Preorder, Inorder, Postorder) by Introduction to Data Structures https://www.youtube.com/watch?v=-aIcPlIQ_MI Youtube: Finding the heavier ball, Khan Academy (decision tree) https://www.youtube.com/watch?v=0Jgow5x09qw ------------------------------------------------------------------ *** Recommended *** Lerma, chap 7 LLM, sect 6.1 and 6.4 ADS, chap 10 BDS, Important concepts at the end of the section 6