Modulo negative hash code

Code reviewMedium16 min

Your task

Review this Java bucketing helper that maps an object to one of n buckets.

hashCode() can return any 32-bit int, and n is the bucket count (e.g. 16).