Write an function for returning value stored in kth node (from end) of the singly linked list
Fantastic news! We've Found the answer you've been seeking!
Question:
Write an function for returning value stored in kth node (from end) of the singly linked list and test using a main program. (return first node value if linked list length is less than k and -1 if linked list is empty).
Related Book For
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss
Posted Date: