Topics covered (since exam 1, excluding PQ):

Slides:



Advertisements
Similar presentations
Definitions and Bottom-Up Insertion
Advertisements

Binary Trees, Binary Search Trees CMPS 2133 Spring 2008.
AA Trees another alternative to AVL trees. Balanced Binary Search Trees A Binary Search Tree (BST) of N nodes is balanced if height is in O(log N) A balanced.
1 Red-Black Trees. 2 Black-Height of the tree = 4.
Balanced Trees. Binary Search tree with a balance condition Why? For every node in the tree, the height of its left and right subtrees must differ by.
1 BST Trees A binary search tree is a binary tree in which every node satisfies the following: the key of every node in the left subtree is.
Splay Trees and B-Trees
1 Red-Black Trees. 2 Definition: A red-black tree is a binary search tree where: –Every node is either red or black. –Each NULL pointer is considered.
Indexing. Goals: Store large files Support multiple search keys Support efficient insert, delete, and range queries.
B-Tree. B-Trees a specialized multi-way tree designed especially for use on disk In a B-tree each node may contain a large number of keys. The number.
Binary Trees, Binary Search Trees RIZWAN REHMAN CENTRE FOR COMPUTER STUDIES DIBRUGARH UNIVERSITY.
CMSC 341 B- Trees D. Frey with apologies to Tom Anastasio.
1 Tree Indexing (1) Linear index is poor for insertion/deletion. Tree index can efficiently support all desired operations: –Insert/delete –Multiple search.
Review for Exam 1 Topics covered: –Asymptotic analysis –Lists and list implementations Stacks and queues –General trees, binary trees –BST For each of.
Review for Exam 2 Topics covered (since exam 1): –Splay Tree –K-D Trees –RB Tree –Priority Queue and Binary Heap –B-Tree For each of these data structures.
Review for Final Exam Non-cumulative, covers material since exam 2 Data structures covered: –Treaps –Hashing –Disjoint sets –Graphs For each of these data.
Exam 3 Review Data structures covered: –Hashing and Extensible hashing –Priority queues and binary heaps –Skip lists –B-Tree –Disjoint sets For each of.
Review for Exam 2 Topics covered: –Recursion and recursive functions –General rooted trees –Binary Search Trees (BST) –Splay Tree –RB Tree –K-D Trees For.
Splay trees Go&Ta How do you organize your world?
SPLAY TREE The basic idea of the splay tree is that every time a node is accessed, it is pushed to the root by a series of tree rotations. This series.
1 Red-Black Trees. 2 A Red-Black Tree with NULLs shown Black-Height of the tree = 4.
Lecture 23 Red Black Tree Chapter 10 of textbook
COMP261 Lecture 23 B Trees.
Definitions and Bottom-Up Insertion
AA Trees.
Binary search trees Definition
CSCE 3110 Data Structures & Algorithm Analysis
BCA-II Data Structure Using C
G64ADS Advanced Data Structures
CSCE 3110 Data Structures & Algorithm Analysis
Multiway Search Trees Data may not fit into main memory
Topics covered (since exam 1):
Red Black Trees
Lecture 16 Multiway Search Trees
Splay Trees.
SPLAY TREE Features Binary Search Tree Self adjusting balanced tree
Review for Final Exam Non-cumulative, covers material since exam 2
Review for Final Exam Non-cumulative, covers material since exam 2
Tree data structure.
Red Black Trees.
Lecture 25 Splay Tree Chapter 10 of textbook
Review for Final Exam Non-cumulative, covers material since exam 2
Binary Trees, Binary Search Trees
CMSC 341 Lecture 10 B-Trees Based on slides from Dr. Katherine Gibson.
original list {67, 33,49, 21, 25, 94} pass { } {67 94}
Review for Exam 1 Topics covered: For each of these data structures
Wednesday, April 18, 2018 Announcements… For Today…
Topics covered (since exam 1):
Red-Black Trees v z /20/2018 7:59 AM Red-Black Trees
Tree data structure.
Topics covered (since exam 1):
B- Trees D. Frey with apologies to Tom Anastasio
Topic 10 Trees.
B- Trees D. Frey with apologies to Tom Anastasio
Red-Black Trees.
Balanced BSTs "The voyage of discovery is not in seeking new landscapes but in having new eyes. " - Marcel Proust CLRS, pages 333, 337.
Red-Black Trees 1/16/2019 1:56 PM Splay Trees v z Splay Trees.
B- Trees D. Frey with apologies to Tom Anastasio
CMSC 341 Splay Trees.
Binary Trees, Binary Search Trees
(2,4) Trees /6/ :26 AM (2,4) Trees (2,4) Trees
Review for Final Exam Non-cumulative, covers material since exam 2
CSE 326: Data Structures Splay Trees
CMSC 341 Splay Trees.
Topics covered (since exam 1):
Red Black Trees.
326 Lecture 9 Henry Kautz Winter Quarter 2002
Binary Trees, Binary Search Trees
Splay Trees Binary search trees.
Topic 10 Trees.
Presentation transcript:

Topics covered (since exam 1, excluding PQ): Review for Exam 2 Topics covered (since exam 1, excluding PQ): General rooted trees Binary Search Trees (BST) K-D Trees Splay Tree RB Tree B-Tree For each of these data structures Basic idea of data structure and operations Be able to work out small example problems Prove related theorems Asymptotic time performance Advantages and limitations comparison

Review for Exam 2 General rooted tree Binary trees Definition Internal and external nodes Height and depth, path length Tree storage methods and their nodes Binary trees Full, complete and perfect binary trees and their properties 4 different orders of tree traversals

Review for Exam 2 BST Definition Basic operations and their implementations find, findMin, findMax insert, remove, makeEmpty Time performance of these operations Problems with unbalanced BST (degeneration)

K-D Trees Review for Exam 2 What K-D trees are used for Multiple keys How K-D trees differ from the ordinary BST levels Be able to do insert and range query/print

Review for Exam 2 Splay tree Definition (a special BST: balanced in some sense) Rationale for splaying (data locality) Splay operation Root without grandparent with grandparent: zig-zag and zig-zig When to splay (after each operation) What to splay with find/insert/delete operations Amortized time performance analysis: what does O(m log n) mean?

Review for Exam 2 RB tree Definition: a BST satisfying 5 conditions Every node is either red or black. Root is black Each NULL pointer is considered to be a black node If a node is red, then both of its children are black. Every path from a node to a NULL contains the same number of black nodes. Theorems leading to O(log n) worst case time performance Black height min and max # of nodes a RB tree with bh=k can have Bottom-up insertion and deletion

Review for Exam 2 B-Trees What is a B-tree Why need B-tree Special M-way search tree (what is a M-way tree) Interior and exterior nodes M and L (half full principle), especial requirement for root Why need B-tree Useful/advantageous only when external storage accesses required Why so? Height O(logM N), so are performances for find/insert/remove B-tree operations search insert (only insert to nonempty leaf, split, split propagation) Remove (borrow, merge, merge propagation, update ancestors’ keys ) B-tree design (determining M and L based on the size of key, data element, and disk block)