public float divideIterative(int dividend, int divider) {
    validateInput(divider);
    float result = 0;
    while (dividend > divider) {
      dividend -= divider;
      result++;
    }
    float decimalPart = (float) dividend / (float) divider;
    result += decimalPart;
    return result;
  }
This algorithm is based on the mathematical property related with the division where a
division es a continuous subtraction.

In space terms, the complexity of this algorithm is O(1) because we are not using any
additional data structure. In time terms, the complexity of this algorithm is O(N) where N is
the number of times you can subtract the divider to the dividend.
src/main/java/com/github/pedrovgs/problem5/DivideUsingSubtraction.java