e method getint n it returns the elements in the node number n assume
Search for question
Question
e- Method get(int n), it returns the elements in the node number n, assume the first node number is 1. You need to check that n is within the range
of nodes in the list, otherwise method get returns null. To make your code more efficient, you should start from the end (header or trailer) that is closer to the target node.What is the complexity of your method?Test the method in main.