Crossover for Work Interview Question

Typical leetcode algorithms questions though hard ones.