class FindKthElement {

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

    int size = calculateListSize(listNode);
    if (k > (size - 1)) {
      throw new IndexOutOfBoundsException();
    }
    ListNode result = listNode;
    int n = size - 1 - k;
    while (n > 0) {
      result = result.getNext();
      n--;
    }
    return result;
  }

  public  FindKthElement();

}