O'Reilly logo

Introducing Data Structures with Java by David Cousins

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

7

Hashing and Hash Tables

Hash Tables Hash Tables

Contents

  • Alternative means of accessing arrays
  • Hashing algorithms and hash tables
7.1 INTRODUCTION

In Chapter 6, we considered two methods for locating items in an array, depending upon whether or not it is in sorted order. The Big-O relationship was established for binary and linear searches. There is an alternative means of organizing an array so that an item may be retrieved ‘directly’ from its location. This makes the operation more efficient, even more so than binary search. In this chapter, we examine this model and its potential advantages.

7.2 AN ALTERNATIVE ARRAY STORAGE MODEL

Imagine a small ...

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