private void removeNextNodesWithValue(ListNode<Integer> srcNode) {
    ListNode<Integer> prevNode = srcNode;
    ListNode<Integer> currentNode = srcNode.getNext();
    while (currentNode != null) {
      if (currentNode.getData().equals(srcNode.getData())) {
        prevNode.setNext(currentNode.getNext());
      }
      prevNode = currentNode;
      currentNode = currentNode.getNext();
    }
  }
Iterative algorithm to solve this problem without any auxiliary data structure. The complexity
order of this algorithm in space terms is equals to O(1) but in time terms is equals to
O(N^2).
src/main/java/com/github/pedrovgs/problem57/RemoveListDuplicatedElements.java