public static void deleteDupsWithoutBuffer(
      MyLinkedList list) {
    if (list != null) {
      while (list != null) {

        MyLinkedList cur = list;

        while (cur.getNext() != null) {
          if (list.getData() == cur.getNext().getData()) {
            cur.setNext(cur.getNext().getNext());
          } else {
            cur = cur.getNext();
          }
        }

        list = list.getNext();
      }

    }

  }