Linked list nth last element
Write a program to find in a linked list nth last element The approach:- Maintain 2 pointers to head of the list. Move 1st pointer n – 1 elements. Now move both the pointers until one of them hits the end of list. Return the other pointer which would point in the linked list nth …