class Solution {
public ListNode getKthFromEnd(ListNode head, int k) {
ListNode headParm = head;
int length = 0;
while (head != null) {
length++;
head = head.next;
}
int index = 0;
while (index < length - k) {
headParm = headParm.next;
index ++;
}
return headParm;
}
}