Typical brain-teaser interview question that will have absolutely no correlation to on-the-job performance but makes the interviewer feel really smart. I thought Google had gotten away from these.
This isn't a brain teaser, they actually correlate with on-the-job performance. When I worked at Google I looked up their internal reports on the subject and they showed that the score people got on these algorithm interviews correlated pretty well with their performance ratings after they got hired. In other words the group of people who got hired even though they had low scores performed significantly worse than th…
Solution: Make a test to test if people can do B. Studies correlate ability to do B with ability to do A.
Complication: Lose lots of candidates who can do A but choose not to get good at B.
Solution: Pay tons of recruiters to pound the pavement and turn over every rock and make sure every tech worker in the world applies.