Write the following methods for the Linked List class:
-
kth from end - argument: a number, k, as a parameter. - Return the node’s value that is k places from the tail of the linked list. - You have access to the Node class and all the properties on the Linked List class as well as the methods created in previous challenges.
- Write out problem statement
- drew it out first because I didn't get it
- create length count
- loop through it to move the current to k
- return value
- The Big O time is O(N) because only iterating each value once and space is O(1) because it gives back a single value
