CST 370 - Week 6
This week's readings focused on AVL Trees, hashing as well as heaps and heapsort. AVL tree is a type of Binary Search Tree, where a “balance factor” is calculated by subtracting the height of the right sub tree from the height of the left sub tree. You rotate an AVL tree in order to maintain its balance property after operations like insertion or deletion. Another topic we covered in class was heapsort, which is a sorting algorithm that uses comparisons to sort elements. This is done by building a max heap, swapping with the last element in an array and then restoring the heap by heapifying, a process that is repeated for the rest of the heap. Overall the lectures, quiz and homework gave me a better understanding of this weeks module.
Comments
Post a Comment