Discuss how hashing works in Python (e.g. how dicts/sets hash keys). Asked in the technical phone screen, after an LC easy/medium problem.
Implement bucket_keys(keys, bucket_count). Given a list of hashable integer keys, return a list of bucket_count lists. Place each distinct key in the bucket at index hash(key) % bucket_count, preserving first-seen order within each bucket. Python equality determines whether two keys are duplicates.
keys is a list of integers and bucket_count is a positive integer. Return a list of lists. Empty buckets must be represented by empty lists.
def bucket_keys(keys, bucket_count):