I'm trying to find a string that shares the same hash result as a given string.
For Example:
If I have the String 'den' and use Java's hashcode() method the hash result = 99,341
String s = "den";
System.out.println(s.hashCode());
Result = 99,341
Knowing that the hashcode() method computes
s[0]*31^(n-1) + s[1]*31^(n-2) + ... + 2[n-1]
How would I go about taking this result (99,341) and finding a string (of the same length) as 'den' with the equivalent hash value?