SEN2212 · Veri Yapıları ve Algoritmalar II

Data Structures and Algorithms II

Trees, BST, AVL, heaps, hashing, graphs and greedy algorithms.

Textbook: Data Structures & Problem Solving Using Java (Mark Allen Weiss)

  1. Week 1
    Introduction and Sorting Algorithms.
  2. Week 2
    Introduction to different tree structures.
  3. Week 3
    Introduction to binary search trees.
  4. Week 4
    Implementing binary search tree using Java.
    • Writing a BST in JavaA generic BinarySearchTree class: the node class, recursive insert/remove/contains/findMin/findMax, traversals, size and height; the 'write a method' patterns asked in exams.
  5. Week 5
    Introduction to balanced trees and implementing AVL balanced tree structure using Java.
    • AVL trees: balance factor and rotationsThe AVL rule that keeps a BST at O(log n), the LL/RR/LR/RL rotations, and the classic exam question: what does the tree look like after inserting in this order?
  6. Week 6
    Using other balanced tree structure using Java.
    • Other balanced trees: red-black, 2-3, B-tree, splayThe five rules of a red-black tree and its insertion cases, splitting in 2-3 trees, the role of B-trees on disk and the splay idea. Drawing a colored tree and tracing splits are the exam questions from here.
  7. Week 7
    Using heap structure and implementing them using Java.
  8. Week 8
    Using heaps as priority queues. Midterm.
  9. Week 9
    Analyzing and implementing hashing algorithms.
    • Hashing: chaining, open addressing and rehashingThe hash function, load factor, separate chaining, linear/quadratic probing, double hashing, lazy deletion and rehashing; step-by-step solutions to the classic 'fill in the table' exam questions.
  10. Week 10
    Analyzing and implementing graph structure using Java.
  11. Week 11
    Analyzing and implementing graph algorithms.
  12. Week 12
    Analyzing and implementing greedy algorithms.
  13. Week 13
    Analyzing and implementing greedy algorithms. Quiz.
  14. Week 14
    Review.