private int getListSize(ListNode<Integer> list) {
    int size = 0;
    ListNode currentNode = list;
    while (currentNode != null) {
      size++;
      currentNode = currentNode.getNext();
    }
    return size;
  }
Iterative solution to this problem. The complexity order of this algorithm in time terms is
equals to O(N) where N is the number of elements in the list. In space terms, the complexity
order is O(1) because we are not using any auxiliary data structure to solve this problem.
This algorithm is based on know the size of the list, but this part of the algorithm is a
problem for the execution time.
src/main/java/com/github/pedrovgs/problem64/GetTheElementInTheMiddleOfTheList.java