O'Reilly logo

C++ Data Structures and Algorithms by Wisnu Anggoro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applying an HashTable ADT using a linear probing technique in the code

Before we apply the HashTable ADT we built using the linear probing technique previously, we will first see how the linear probing technique handles a collision by applying it to the phone number list we had at the beginning of this chapter. We will also define TABLE_SIZE as 7, which is the same as our previous separate chaining techniques, as a comparison to separate the chaining technique.

First, we have phone number 434 owned by Dylan, which will be stored in cell 0. The next is phone number 391 owned by Dominic, which will be stored in cell 6. Phone number 806 owned by Adam in cell 1, phone number 117 owned by Lindsey in cell 5, phone number 548 owned by Cameron in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required