Skip to Main Content
Programming and Data Structures
book

Programming and Data Structures

by Ashok Kamthane
August 2009
Intermediate to advanced content levelIntermediate to advanced
604 pages
21h 39m
English
Pearson India
Content preview from Programming and Data Structures
558 Programming and Data Structures
calculated and their mid digits are evaluated. Based on the mid digits the keys are paced in the
appropriate index. Here the mid digit obtained can be from 0 to 9. Hence, we may need up to ten
indices starting from index 0 through index 9.
For example, if the key is k=10,
H(10)=(10*10)=100.
Its middle digit is 0. Hence, number 10 would be placed in index 0. Similarly, the same procedure is
adopted for all other numbers and they are placed in different indices based on the mid digit value.
Consider the following numbers for constricting the hashing table.
12,14,18,20,36,31,27,35,23,59.
Table 15.2 Table of
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Data Structures and Algorithms

Learning Data Structures and Algorithms

Rod Stephens
Data Structures and Algorithms in C++, Second Edition

Data Structures and Algorithms in C++, Second Edition

Michael T. Goodrich, Roberto Tamassia, David M. Mount

Publisher Resources

ISBN: 9789332506343