233k views
2 votes
What is the mid-square method?

User Ryggyr
by
7.5k points

1 Answer

3 votes

Step-by-step explanation:

Mid-Square Method:-In this method some it takes some digits from the square of a number.This number is a random number.This number can be used as a key for hashing.

This technique is mostly used in hashing so decrease the collision in hash maps.

This method has a limitation that when we square a large number it may go out of range of integer so we have handle those cases.

User Kiril Ivanov
by
6.6k points