3 ms·
The hashing algorithm is specified in the docs: s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] Per Hyrum's law, there's no changing it now. https://docs.ora
by ncruces 1y ago
The hashing algorithm is specified in the docs:
s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]
Per Hyrum's law, there's no changing it now.
https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#hashCode-- https://docs.oracle.com/javase/8/docs/api/java/lang/String.h...