I love this post and would have a similar “WTF?”
Alan Wolfe

The candidate may be in some level of stress. To give a bit of context, this question popped up in a phone interview. And personally… I may just have frozen, I don’t know. When I was submitted this question, I had no stake in finding a solution, but still couldn’t pass the initial “any solution would suck” instinctive feeling. An funnily enough, I’m really not exaggerating when I say ‘instinctive’
You may need a few minutes to properly model the solution in your head, or do some sketching or whatever works for you. And you may not have that time, or you may feel like you don’t have it. 
I remember a talk from Sean Parent where he talks how he played with shoe laces and beans to think about graphs. And that resonate with me in that a tactile/hand-on/reposed approach has better chance to lead to a proper solution than forcing an algorithm out of existence from thin air.
But I guess that can be said about problem solving in interview in general.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.