Hypothetical interview question: Write a function that finds the distance between two words.
Candidate A: Can recite algos and remembers that Levenshtein distance is the answer.
Candidate B: Has no idea what Levenshtein distance is, writes a brute-force solution with the understanding that it's not an optimal solution. After the interview she spends more time learning what she doesn't know, learns about Levenshtein distance, and sends you an optimal solution via email.
The above is a real-life scenario, so my question to you is - how do you decide who to hire?
This is not a good interview question and neither candidate seems to have answered it well, but I would reject B first because I obviously don't know whether she did any research or whether she just asked Candidate A via StackOverflow