I just finished Coinbase's OA. Overall I felt the problems weren't that hard, but there was a huge amount of code to write. If you hadn't prepared for it ahead of time, I don't think a normal person could finish the whole thing on first sight. This kind of test is honestly ridiculous, damn it — it really feels like they're just hunting for code monkeys.
The problem was the cloud_storage one that's been mentioned on the forum before, the kind that covers the recent common variants of this question.
I feel like depending on which coding language you pick, the problem has some variation.
For mine this time, the twist was: after add_user, there's an added feature, update_capacity(user), which changes the user's capacity. If after the change the usage goes over the limit, you delete the user's current files starting from the largest down to the smallest until the capacity constraint is satisfied.
Another twist was needing to support compress_file and decompress_file — the approach is file_name <----> file_name.compressed, where the file size gets divided by 2 after compressing and multiplied by 2 after decompressing. Then you need to be careful about whether the user and the file exist, and their relationship, and so on.
Discussion
Loading comments…