I'm surprised why no one has mentioned the fact that the recruiter hinted the candidate and that the candidate could've prepared that convoluted answer beforehand. I would've certainly not hired him. Also, it is stupid to measure if a candidate knows some graph algorithm that you learn in CS 101 or some new js features that no one in their sane mind would use in prod, you should probably be more worried about thought process, concepts of modularity, maintenability and experience.