Q2: In a demo class, write a java static method called removeNNodes that receives a reference parameter named list of ty
Posted: Mon Jun 06, 2022 1:37 pm
Q2: In a demo class, write a java static method called removeNNodes that receives a reference parameter named list of type LLNode of integer values. Your method should remove the first N nodes form the LLNode. Hint [The value of N should not be greater than the number of nodes in the LLNode list] For example, if the list contains: list <-4 3 10 Then after calling the method removeNNodes with N=2, the list becomes as follows: list 3 10 Example2, if the list contains: list 4 3 10 1 Then after calling the method removeNNodes with N-5, the list becomes as follows: list