hash tables integer keys are the easiest to hashbut there are many times when we have to deal with keys that are either strings or mixture of strings and integers when dealing with non-integer keysthe most common approach is to first convert the key to an integer value and then apply an integer-based hash function to that value in this sectionwe first explore several hash functions that can be used with integers and then look at common techniques used to convert strings to integer values that can then be hashed division the simplest hash function for integer values is the one we have been using throughout the the integer keyor mixed type key that has been converted to an integeris divided by the size of the hash table with the remainder becoming the hash table indexh(keykey computing the remainder of an integer key is the easiest way to ensure the resulting index always falls within the legal range of indices the division technique is one of the most commonly used hash functionsapplied directly to an integer key or after converting mixed type key to an integer truncation for large integerssome columns in the key value are ignored and not used in the computation of the hash table index in this casethe index is formed by selecting the digits from specific columns and combining them into an integer within the legal range of indices for exampleif the keys are composed of integer values that all contain seven digits and the hash table size is we can concatenate the firstthirdand sixth digits (counting from right to leftto form the index value using this techniquekey value would hash to index folding in this methodthe key is split into multiple parts and then combined into single integer value by adding or multiplying the individual parts the resulting integer value is then either truncated or the division method is applied to fit it within the range of legal table entries for examplegiven key value consisting of seven digitswe can split it into three smaller integer values ( and and then sum these to obtain new integer the division method can then be used to obtain the hash table index this method can also be used when the keys store data with explicit components such as social security numbers or phone numbers hashing strings strings can also be stored in hash table the string representation has to be converted to an integer value that can be used with the division or truncation