AC 2
store the gap between current value and the minimum
- another way?
- we can improve AC 1 by using a defined class store the min value,
  so don't need to predefine the size of minArray