public class Node { Object element; Node next; Node position; private int size; Node mem []= new Node[size]; public class Position { } public Node cursormalloc() { Node p; p = mem[0].next; mem[0].next = p.next; return p ; } public void cursorFree(Position p) { mem[p].next = mem[0].next; mem[0].next =p; } public boolean isEmpty(LIST l) { return (mem[l].next); } public Position find(LIST l,int x) { Position p; p = mem[l].next; while((p != 0)&& (mem[p].element != x)) p = mem[p].next; return p; } public void delete(LIST l,int x) { Position p; Position temp; p = findPrivios(l,x); if(mem[p].next !=0) { temp = mem[p].next; mem[p].next = mem[temp].next; cursorFree(temp); } } public void insert(LIST l,int x) { Position temp; temp = cursormalloc(); if(temp == 0) System.out.println("it is error"); else mem[temp].element = x; mem[temp].next = mem[p].next; mem[p].next = temp; } public Position findPrivios() { Position p; p = mem[l].next; while((p.next != 0)&& (p.next.element !=x)) p = mem[p].next; return p; } }