Issue number #271
This is the code to find the Nth node from the last in the linked list.
I have used c++ language.
The linked list is first created using insert operation and then passed on to the function along with the value of n.
Then at first counts the number of nodes in the linked list.
Then it finds the nth node from the last.
If this node exists,then it returns the node and prints the data in the node.
If this node does not exist then it returns null and prints that NODE DOES NOT EXIST.
Description
Issue number #271 This is the code to find the Nth node from the last in the linked list. I have used c++ language. The linked list is first created using insert operation and then passed on to the function along with the value of n. Then at first counts the number of nodes in the linked list. Then it finds the nth node from the last. If this node exists,then it returns the node and prints the data in the node. If this node does not exist then it returns null and prints that NODE DOES NOT EXIST.