plenty of candidates with otherwise amazing track records can't code comically simple functions
Sadly, this rings true. In a non-whiteboarding context I’ve sometimes asked JS/TS candidates something that I originally though was a nice easy, practical sort of algorithm question: how would you find the intersection of two string[] arrays? Even with plenty of hints probably the majority don’t get beyond a nested loop (sometimes they progress to [].filter and [].includes, which just hides it).
Sadly, this rings true. In a non-whiteboarding context I’ve sometimes asked JS/TS candidates something that I originally though was a nice easy, practical sort of algorithm question: how would you find the intersection of two string[] arrays? Even with plenty of hints probably the majority don’t get beyond a nested loop (sometimes they progress to [].filter and [].includes, which just hides it).