Level: Junior-Level
Round: Onsite · Type: Coding · Difficulty: 7/10 · Duration: 120 min · Interviewer: Unfriendly
Topics: Data Structures, Algorithms, String Manipulation
Location: New York, NY, US
Interview date: 2026-02-15
Question: Implement a class with insert and findLargest methods.
Question: Implement string decompression.
The coding question was to write a class that supports insert(num: int) and findLargest(k:int) methods. For example:
insert(3) insert(3) insert(2) findLargest(0) is 3 findLargest(1) is 3 findLargest(2) is 2
The goal was to make the findLargest method as efficient as possible.
The coding question was string decompression. For example:
"a(abc){3}" = "aabcabcabc""a(b(c){2}){3})d" = abccbccbccdI didn't need to consider cases where left parentheses were missing or right parentheses were missing. The curly braces {} always appear after a right parenthesis, so there was no need to consider invalid parenthesis edge cases. The range of numbers was 2-99.