From a lot of the comments it feels like many people don’t seem to understand what the interviewers were looking for.
To be clear upfront, it wasn’t simply getting the right answer spat out by the candidate’s solution.
At one level they were trying to asses that you did in fact know how to write code, but since they’re assuming most of their candidates can write code, they were also checking to see what you would do when presented with evolving requirements and constraints.
If I were the interviewers (considering candidates are more stressed than they would normally be on a job), I wouldn’t necessarily require the candidates got all the requirements met as long as they were clearly on the right track and able to explain what they were doing.
Although the technical assessment was contrived (which is okay in an interview), it was absolutely not a “leet code” style problem, but instead super approachable and easy to understand. It doesn’t seem they were doing anything to “try catch people out” so as to disqualify them, but made it interesting enough that they could hopefully get a bit of insight into how the candidate tends to think and behave.
I do think the interviewers were silly to entertain the candidate’s approach for as long as they did, after it was clear that it was very impressive, even if highly impractical for the actual task at hand (which was to show the interviewers your typical day-to-day approach to coding tasks), they should have said very clearly to the candidate “your solution is very impressive and clever, but as we’re trying to gain insight on your approach to typical day-to-day coding, please change your approach such that we’re able to do so”. And they kind of did say something similar, which the candidate essentially ignored to… outsmart them?
If you ask me, the candidate is very skilled and intelligent, but at the same time not very smart in terms of understanding what other people actually “need”.
Most properly experienced software developers have learnt that often what customers “ask for” isn’t actually what they need, very often you give them what they asked for and when they actually see it in action, they realize it won’t actually do what’s needed and then iteration happens.
The candidate in this case gave the interviewers what they asked for, but not what the interviewers needed from them.
The hard parts of software development is almost always not about building something that technically works, but rather working out what’s actually needed.
My message to the candidate is, you seem very technically talented, but you don’t seem to understand very well about how the world and most people in it tend to “work”.