public void replace(int index,Solution solution){
  data.set(index,solution);
}

public void replace ( int index , Solution solution ) { data . set ( index , solution ) ; }
replaces the solution at the given index .
