fixed cs520 prog7

first I fixed a stupid mistake where I returned the minimum value
instead of the index of the minimum value from array_min

next I chaged the way I do round robin replacement to match the
expected results, which is kind of a hack, but works