Crossover for Work Interview Question

Write a code - tree