Think of a data structure that can be used for sorting in a way that only stores k elements when there are only k keys.