Crossover algorithm implementation