Week 7: Balanced & Other Trees

General Practice

Gnarly Trees - Download gt.jar (requries Java) from classroom files. Chose DataStructures->Dictionaries - look for AVL, RB, or B-Tree

Activities

Monday

Tuesday

  • Rotation Implementations
  • B-Tree
  • B-Trees & Red Blank Trees - focus on pg 187-193
  • Practice:
    • B Tree WS
    • Gnarly Trees - Download gt.jar (requries Java) from classroom files. Chose DataStructures->Dictionaries BTree and 2-3-4 Tree (2-3-4 is the BTree that corresponds to Red Black trees)
    • B-Tree Insertion Trackla.jar, Content->Search Trees->BTree
      hint: duplicates go left
    • B-Tree Sim - pick degree 4 and check preemptive split

Wednesday

  • RB-Trees
  • Check out the wikipedia article on RB Trees. Focus on the overview of how they work, not the code samples. Red/Black Trees
  • Practice:
    • RB WS
    • Red-Black Tree Sim
    • Red/Black Coloring Trackla.jar, Content->Search Trees->BTree
      note that each problem can have multiple valid answers
    • Red/Black Insertions Trackla.jar, Content->Search Trees->BTree
      more concerned with you being able to translate RB tree into an equivalent BTree of degree 4, but if you can do this, you know you know the stuff

Friday

  • Heaps
  • Read ch 20.9
  • Practice:

Classroom slides/examples:

Directory of classroom files from the week
Right click files and save to your computer