Crossover for Work Interview Question

Programming challenge (à la Hackerrank, Codility, CodeSignal, etc)