CST370 Engagement Week 6
Learning Journal Week 6:
New data structures are introduced this week. We learned that AVL trees can maintain balance by ensuring each node has a balance factor of -1, 0, or 1 and they use several rotations (right rotation, left rotation, LR, RL) to re-balance the tree after insertion and thus avoid the O(n) worst case search time for a BST. We also briefly learned about 2-3 trees and how they use node splitting and promotion to maintain balance during insertion. Another significant topic for the week was heaps and hashing. We saw how max heaps can be used for priority queues and how heapify-up/heapify-down can maintain heap property after modification. It was also interesting to learn about bottom-up heap construction and how its runtime is better than inserting each element into a heap one by one. Lastly, we learned about hash tables and how hash function is used to provide average O(1) search time. We also studied about collisions and some commonly used collision resolution strategies such as separate chaining, linear probing, and hashing.
Comments
Post a Comment