class Prac{ 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;i Length(n)) return; if(index==0){ if(first == null){ first = t; } else{ t.next = first; first = t; } } else{ for(int i=0;iLength(n)){ return; } if(index==0){ if(n==first){ first = first.next; } } else{ for(int i=0;i