Implemented an algorithm to find the nth to last element of a singly linked list