I use Java, which has libraries to do what you are posting. STL may have routines to do this, I do not know. For any other language I have no information. In general, an array when used for hashing access is an array of constant size. Sooner or later Captain Hardcode resists recode and so what I did was provide my effort great assistance by considering Tree Map, which I now use along with Java Hashtable as almost interchangeable storage containers only using hash based array indexing when I can oneday figure how to map from the array containing the keys to the array containing the data.