Pregunta de entrevista de Crossover for Work

Typical leetcode algorithms questions though hard ones.