Find the kth to last element of a singly linked list.
Example:
Input: 1 -> 2 -> 3 -> 4 -> 5, k = 2
Output: 4
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.