Around the start of September I did a 60-minute phone screen with Cursor. After Cursor merged with SpaceX AI it got renamed to SpaceX AI. The problem was writing a Merkle tree.
You have to build a Merkle tree to represent a file system, write get_hash, and write diff to compare 2 trees. You have to write all the tests yourself.
The logic is the same as a Merkle tree, except a node can have N children.
class Merkle Tree:
def build (self, path):
def get_hash(path, tree):
def diff(tree, tree):
Their bar is really high. If you've never used Python's file system stuff and never written a file system before, you probably won't be able to write this. It feels like they're looking for people at ACM competitive programming level.
They seem like the kind of company that weighs coding really heavily.
You have to finish all of it in 60 minutes. I had written a file system before, so I did finish everything. I stumbled a bit while writing the tests and had 1 or 2 small bugs, but I fixed all of them. I still got rejected. I guess you need to get through with zero hiccups.
Whatever, it's up to fate. Even if I had passed this round, there was no guarantee I'd pass the next one.
Discussion
Loading comments…