@@ -0,0 +1,1658 @@
+// Java program to delete nodes which have a greater value on %0A// right side%0Aclass LinkedList%0A%7B%0A%09Node head; // head of list%0A%0A%09/* Linked list Node*/%0A%09class Node%0A%09%7B%0A%09%09int data;%0A%09%09Node next;%0A%09%09Node(int d) %7B data = d; next = null; %7D%0A%09%7D%0A%0A%0A%0A%0A%09Node  delLesserNode(Node head)%0A%09%7B%0A%09    if(head == null %7C%7C head.next == null)%7B%0A%09        return head;%0A%09    %7D%0A%09    Node prev= null;%0A%09    Node current = head;%0A%09    Node next = head.next;%0A%09    if(current.data %3C next.data)%7B%0A%09       next = delLesserNode(next);%0A%09       return next ;%0A%09    %7Delse%7B%0A%09        current.next=delLesserNode(next);%0A%09        return current;%0A%09    %7D%0A%09    %0A%0A%09%7D%0A%0A%09/* Utility functions */%0A%0A%09/* Inserts a new Node at front of the list. */%0A%09void push(int new_data)%0A%09%7B%0A%09%09/* 1 & 2: Allocate the Node &%0A%09%09%09%09Put in the data*/%0A%09%09Node new_node = new Node(new_data);%0A%0A%09%09/* 3. Make next of new Node as head */%0A%09%09new_node.next = head;%0A%0A%09%09/* 4. Move the head to point to new Node */%0A%09%09head = new_node;%0A%09%7D%0A%0A%0A%0A%09/* Function to print linked list */%0A%09void printList()%0A%09%7B%0A%09%09Node temp = head;%0A%09%09while (temp != null)%0A%09%09%7B%0A%09%09%09System.out.print(temp.data+%22 %22);%0A%09%09%09temp = temp.next;%0A%09%09%7D%0A%09%09System.out.println();%0A%09%7D%0A%0A%09/* Drier program to test above functions */%0A%09public static void main(String args%5B%5D)%0A%09%7B%0A%09%09LinkedList llist = new LinkedList();%0A%0A%09%09/* Constructed Linked List is 12-%3E15-%3E10-%3E11-%3E%0A%09%095-%3E6-%3E2-%3E3 */%0A%09%09llist.push(3);%0A%09%09llist.push(2);%0A%09%09llist.push(6);%0A%09%09llist.push(5);%0A%09%09llist.push(11);%0A%09%09llist.push(10);%0A%09%09llist.push(15);%0A%09%09llist.push(12);%0A%0A%09%09System.out.println(%22Given Linked List%22);%0A%09%09llist.printList();%0A%0A%09%09llist.head = llist.delLesserNode(llist.head);%0A%0A%09%09System.out.println(%22Modified Linked List%22);%0A%09%09llist.printList();%0A%09%7D%0A%7D %0A

Create DeleteNodeWithGreaterValOnRight.java