1 / 4

Understanding Hash Codes and AVL Trees in Data Structures (CS-2852 Week 9)

In Week 9 of CS-2852, we explore key concepts in data structures, focusing on hash codes and AVL trees. Dr. Josiah Yoder highlights the importance of hash codes, emphasizing that the hash code of an object must remain constant unless the object itself changes. The principles of equality (if a.equals(b), then a.hashCode() == b.hashCode()) and how to efficiently manage data structures using AVL trees are discussed. Additional resources include links to detailed explanations of AVL and Red-Black trees, enhancing your understanding of these fundamental data structures.

lakia
Download Presentation

Understanding Hash Codes and AVL Trees in Data Structures (CS-2852 Week 9)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS-2852Data Structures • Week 9, Class 1 • Hash-code parting remarks • Rotations • AVL Trees CS-2852 Dr. Josiah Yoder Slide style: Dr. Hornick

  2. General Contract for HashCode • Must not change if object doesn’t change • If a.equals(b), then a.hashCode() == b.hashCode() • If !a.equals(b), then perhaps a.hashCode() == b.hashCode() But it is better if a.hashCode() != b.hashCode() CS-2852 Dr. Josiah Yoder Slide style: Dr. Hornick

  3. AVL Trees http://www.qmatica.com/DataStructures/Trees/AVL/AVLTree.html Red-black trees http://gauss.ececs.uc.edu/RedBlack/redblack.html (Third Google hit for “red black tree”) CS-2852 Dr. Josiah Yoder Slide style: Dr. Hornick

  4. CS-2852 Dr. Josiah Yoder Slide style: Dr. Hornick

More Related