2 ms·
The question was explain the exact approach Java uses to hash strings, not come up with a way to hash string or explain why does this particular approach work f
by dagw 11y ago
The question was explain the exact approach Java uses to hash strings, not come up with a way to hash string or explain why does this particular approach work for hashing strings.
Much like hashes themselves going one direction is much harder than the other.
- CHY872 11y agoMeanwhile, my actual Google interviewer asked me how I might do it. He then explained why my Gödel numbering scheme was bad, showed me how Java does it, was seemingly satisfied enough and offered me a job on his team. Google has a bad rep, but it is possible to sort it out.
- dagw 11y agoThat sounds eminently reasonable.