private void validateInputData(int[] moneys, int billAmount) {
    if (moneys == null || moneys.length == 0 || billAmount <= 0) {
      throw new IllegalArgumentException(
          "Review your parameters used as input, you can't use a null or empty array of moneys or "
              + "a bill amount equals or less than zero.");
    }
  }
Iterative solution to this algorithm. This algorithm has a complexity order equals to O(N)
where N is the billAmount/maxMoneyValue. At the end, linear to the value passed as parameter.
src/main/java/com/github/pedrovgs/problem47/ReturnChange.java