3 ms·
Collisions are extremely unlikely. You will know if a collision occurred if the answer is rejected. If that happens you can tweak the hash algorithm and try aga
by tantalor 4y ago
Collisions are extremely unlikely. You will know if a collision occurred if the answer is rejected. If that happens you can tweak the hash algorithm and try again. This would allow saving coordinates outside of the [-1000, 30000] range.
I think it would be easier to reason about because,
1. KISS: You don't need to verify the encoding code is correct.
2. YAGNI: The program doesn't require reading the coordinates back out, so the program should not store the coordinates in a format that can do that.