Two interviewers led my coding round on retrieving values from a parsed JSON tree. Paths were supplied as strings, and an array without an explicit index meant returning matches across its elements. I used a tagged structure and discussed unions and virtual classes as alternatives.
I finished the traversal in about twenty minutes, then corrected boundary issues found in a dry run. The interviewers asked for tests and said I could construct values directly without a parser. I had not written tests by hand recently and found that part awkward. I questioned whether equality comparisons would be generated automatically; eventually, they asked for a simple string-result comparison, which I wrote.
More than ten minutes remained for conversation. From this interview and the earlier phone round, I had a positive impression of the company atmosphere and the responsibility given to younger engineers.
Discussion
Loading comments…