September 17: Applied while sending out resumes broadly.
October 2: Received the OA.
October 9: Finished CodeSignal.
The usual four-stage CodeSignal implementation question: build a cloud file-storage system. Level 1: Add and remove files, each with a specific size. Level 2: Return the N largest files. Level 3: Add files by user and merge users—all of user 2's files and remaining capacity go to user 1. Level 4: Back up a user and restore a user's backup.
I scored 572/600.
It was a fairly standard question, very similar to other tiered ones. For levels 1 and 2, I directly used a files<string, int> hash map. In level 3 I added a User class with int capacity, set files, and int usedSpace. I did not think to store each file's size separately at level 3. I only realized I needed that while debugging restore in level 4. With time running out, I changed set files to map<string, int>, and the code got a bit messy. At the very top of the file, I finally added a refactoring note: get rid of the files map or add an "admin" user type. That should make the code cleaner.
October 15: Karat interview.
There were three short-answer questions; I only remember two. For a heap-implemented priority queue, what is the time complexity of adding a new element, polling until an existing element is found and re-heapifying, and polling the top element? The other gave a recursive preorder function and asked for its time and space complexity.
The coding question was Red Black Tile. I wrote it and the logic was all correct, but when I went to print the result, my earlier choice of List<String[]> as the result type meant it only printed an address. I wasted the remaining time trying to change the type and did not finish...
The interviewer was super nice and kept engaging with me throughout, saying "mm-hmm." When time ran out, they reassured me that partial credit would be considered.
October 19: Rejected.
Discussion
Loading comments…