find missing numbers algorithm implementation