class Node {
int data;
Node nextNode;
}
class LinkedList {...}
public class Main {
public static void main(String[] args) {
LinkedList ls = new LinkedList();
ls.insert(10);
ls.insert(20);
ls.insert(30);
ls.print();
ls.insertNth(25, 2);
ls.print();
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX