struct Node *ptr = (struct Node*) malloc (sizeof (struct Node))
//node structure
class Node {
public int data;
public Node next;
};
class LinkedList {
public Node head;
//constructor to create an empty LinkedList
public LinkedList(){
head = null;
}
};