Implemented function to find nth to last element from linked list