Program for n’th node from the end of a Linked List
Oct 30, 2020
--
Given a Linked List and a number n, write a function that returns the value at the n’th node from the end of the Linked List.
code:
def get_from_last(self,index):
temp = self.head
node = self.get_length() - index+1
temp = self.get_n(node)
return temp