class Ins{ static Node first, last,t; static class Node{ int data; Node next; Node(int d){ data = d; next = null; } } void create(int a[], int n){ first = new Node(a[0]); last = first; for(int i=1;iLength(n)){ return; } t = new Node(x); if(index==0){ first = t; } else{ for(int i=0;iLength(p)){ return; } if(index==0){ first = first.next; } else{ for(int i=0;i