Hopper·Software Engineer·Technical Phone Screen
May 2026
Hopper software engineer interview with a sorting problem that looks simple until you start thinking about edge cases. The follow-ups were where things got interesting.
- Given a list of filenames, implement a custom comparator to sort them: digit-starting names come before letter-starting names, and numeric chunks within names are compared by value rather than lexicographically. Return the sorted list.
- How would you handle ordering file01.txt versus file1.txt when leading zeros are involved? Define a rule and justify why it's deterministic.
- How would you optimize the sorting for very large inputs to avoid recomputing the chunk decomposition on every comparison?
“My first instinct was to just split on digit/non-digit boundaries and compare chunks in order, which is basically the right move.”