Return the K Smallest Integers
Company: Hudson River Trading
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Overview: Return the k smallest integers from an unsorted list in ascending order while preserving duplicates. Compare full sorting, a size-k max-heap, quickselect plus prefix sorting, and counting methods across k, memory, repeated queries, and worst-case guarantees.