0% found this document useful (0 votes)
8 views2 pages

Introduction To HashMap HashTable in Java

The document discusses hashmaps and hashtables in Java. It explains that elements are stored as integers known as hashcodes and collisions can occur when two elements are assigned the same index after hashing. Two ways to handle collisions are chaining and open addressing.

Uploaded by

mahaka365
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Introduction To HashMap HashTable in Java

The document discusses hashmaps and hashtables in Java. It explains that elements are stored as integers known as hashcodes and collisions can occur when two elements are assigned the same index after hashing. Two ways to handle collisions are chaining and open addressing.

Uploaded by

mahaka365
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

View, add and edit your notes in the app

Introduction to HashMap & HashTable in Java


Generated on May 14, 2024

Summary

Notes Screenshots Bookmarks

12 0 0

returs value for in constant of time

7:28

used in interpreter and compiler

9:09

keyss have to be integers

12:52

reducing the size of hashcode is known as hashing

13:42

1. elements are stored as integers known as hashcodes

13:48

usually hashcode of a number is the number itself

20:35
collision : when two elements are assigned same index after
hashing

25:49

2 ways two beat collision: i) chaining ii) open addressing

26:26

chaining: adding elements to the same index as linked lists

27:14

worst case scenario: all elements belong to the same index

28:44

we can prevent this scenario using simple uniform hashing

29:39

every key is equally likely to be hashed anywhere in the tabel:


simple uniform hashing

30:15

You might also like