{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CS301-Lec43 handout

# CS301-Lec43 handout - CS301 Data Structures Lecture No 43...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CS301 – Data Structures Lecture No. 43 ___________________________________________________________________ We have an array shown in four different columns. The size of the array is 100 and the index is from 0 to 99. Each element of the array has two locations so we can store 200 elements in it. When we have first collision the program will use the 2 nd part of the array location. When there is a 2 nd collision the data is stored using the linear probing. At the top right corner we have hash function x and its definition is “mod 100”. That is when a number is passed to it, it will take mod with 100 and return the result which is used as index of the array. In this example we are using numbers only and not dealing with the characters. We also have a statistical table on the right side. This program will generate 100 random numbers and using the hash function it will store these in the array. The numbers will be stored in the array at different locations. In the bottom left we have hashing algorithms. We have
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 7

CS301-Lec43 handout - CS301 Data Structures Lecture No 43...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online