Some startups are still requiring weird whiteboard questions sadly. Interviewed for a role recently and was asked to navigate a maze of obstacles and teleports with possible infinite loops, saying the minimum number of steps to leave the maze if it’s possible. That was for a test engineering role so… WTF.
I assume they wanted more than a DFS or BFS or similar with loop detection? The teleports sound like a fun twist, although I'm not sure they change that much since from a graph perspective presumably they're just another edge?
Actually it was literally a hard leetcode question! The other 3 were 2 medium and 1 easy. I can work out easy and medium leetcode answers from first principles in an interview setting, usually. I can't with hard ones tbh.
But ultimately it seems very divorced from reality of what I do, which is TestOps (building out CI pipelines, reporting, test infra, etc...).
I'm sure it's simple if you know it! But having not taking an algorithm class before, and having completed three other Algorithm questions within the 90 min total allotted time, I crashed pretty hard. I solved it afterwards when I had time to really think, but didn't know it off the top of my head.