Pergunta de entrevista da empresa LinkedIn

A coding question that was more of a trick than an algorithmic problem to work through.