class FindKthElement {

  public ListNode find3(ListNode listNode, int k) {
    validateInput(listNode, k);

    ListNode pointer2 = listNode;
    for (int i = 0; i <= k; i++) {
      if (pointer2 == null) {
        throw new IndexOutOfBoundsException();
      }
      pointer2 = pointer2.getNext();
    }

    ListNode result = listNode;
    while (pointer2 != null) {
      result = result.getNext();
      pointer2 = pointer2.getNext();
    }
    return result;
  }

  public  FindKthElement();

}