As the title says, I applied around the end of February this year. Last Tuesday I did the hiring assessment, and right after that the OA got sent out. It's a Hacker Rank test, and it feels pretty different from the CodeSignal OA that the earlier new-grad wave got, so I wanted to write it up and share.
There are two questions total, and they explicitly said some questions let you use an AI tool, with a sample question you can try the AI tool out on first. But the sample question is really dumb. I picked Python, and I was given two problems: one where you write a Django REST API yourself, with only file templates and no function templates, and you can't ask the AI anything — feels pretty pointless. If you're already comfortable with Django you can mess around with it, but I never got mine running. The second sample is a plain coding question with the AI tool enabled, but what is there to even ask the AI about FizzBuzz? So I went into the real thing with zero experience using the tool.
The actual test is also two questions, 90 minutes. The email said 70 minutes should be enough, but I dragged it out to the very last minute before I got things running. Getting familiar with the AI tool beforehand is genuinely worth it. My suggestion is to spend more time playing with the sample and asking it all kinds of questions to see what it answers well and what it doesn't.
Question 1: given an email content string, a verification string, and a slicing constant k, you need to map every k letters of the email into a checksum number — a-z maps to 1-25, and ":", "/", "." map to 26-28 — sum them up, then use the verification string to look up a spam-verification letter, wrapping around with mod if you go past the length. Concatenate all the verification letters into a verify string and return it. The problem framed this as Gmail's anti-spam logic.
There's not much to say about the solution — you just follow the spec and implement it. I'm not really sure what the point of this question was. My advice: if you get this one, knock it out in 5-10 minutes and save the rest of your time for question 2, the AI question.
Question 2 is a feature rollout system, used for rolling out new features to users. Every time you roll out a new feature you need to check things in order:
- Whether the user's country meets the requirement. If not, return a ResultDecision object with enable = False and a string explaining why it doesn't qualify (the country).
- Whether the user's system version meets the requirement — Android has a version number and iOS has a version number, and the user's version has to be greater than or equal to that number to qualify. Otherwise return something similar to (1), just with a different string.
- If neither the country nor the system qualifies, the returned string has to use the dedicated "country and system" string.
- All of the above has to be checked before you check the new feature's dependencies — if it doesn't pass, you don't even need to check dependencies. Less than half the test cases seem to cover this part. Note that some of these checks are supposed to use a set the system already provides — don't write your own, since it might not match. Test cases you write yourself do seem to pass either way, though.
- Feature dependency is basically a LeetCode course-scheduling type problem. Features fall into three categories: ones where the user has already enabled the dependency feature, ones where this feature's rollout doesn't need any dependency, and ones where this feature needs a dependency that's also in the current rollout list. The dependency list is provided as a plain text file, and the system has a parser for it, but the parser has a bug — you can tell from the test case errors that when there's more than one dependency, the output list format is wrong and stores two dependencies as a single string inside the list. Fix that and it's fine.
- Next you need to modify the system's evaluate function a bit, because by default it can't handle:
(I) the case where there's exactly one dependency
(II) the case where the dependency feature is also part of this rollout
(III) the case where there's a simple A-B cycle
(IV) the case where A depends on B and B is in a cycle
(V) the case where there's an A-B-C-D cycle and it can't report the first feature (A) that entered the cycle
(VI) the case where there's an A-B-C-D cycle and it can't list B, C, D in the cycle report - Once you fix all of that, the test cases pass. The AI tool is actually pretty useful here — if you just paste in the test case error message and ask it to locate the source of the error, it gives decent localization and suggestions, and following its suggestions gets things passing most of the time. It refused to answer a question about Python's
stripandsplitmethods — I had made a change that I thought was correct but it wasn't running, so I asked about it, and it turned out you can't just swap them directly becausesplitreturns a list, so you need to strip off the outer list on the caller's side. The AI tool was able to notice that the if-condition I added inside the evaluate function was covering too broad a range, and it suggested an appropriate recursive call to fix it. It didn't seem able to catch a bug where I was calling a method on a None object — I ran the code myself and fixed that one by hand. But even after fixing it, things still didn't fully run clean — there seemed to be another spot, in a file I wasn't supposed to touch, that was also calling a method on a None object. I was running out of time and all the test cases I had were passing, so I just left it and submitted.
Overall this OA feels different from some of the ones I did last year. Question 1 doesn't really feel like an algorithm question at all, and question 2 has an AI component that wasn't there before. You still need to apply to more places and practice more to get used to the new format. The AI questions require you to be comfortable with the AI tool and with the new style of problem-writing, because with AI in the loop the problem statements have gotten a lot longer — if you approach them the old way, without AI, and you're not fast at reading, you can easily run out of time. And now that AI is involved, I'm honestly not sure whether asking it something too dumb costs you points... Anyway, it's all gotten a lot more complicated. It's not like before, where just grinding LeetCode was enough to naturally get better. Cherish the process while you're still in it, I guess.
Discussion
Loading comments…