SinglyLinkedList Operations
import java.util.*; import java.lang.*; import java.io.*; class SinglyLinkedList { private static Node head; private static void create(int[] data) { // create first Node head = new Node(data[0], null); // if only single element if(data.length == 1) { return; } Node last = head; for(int i = 1; i < data.length; i++) { Node newNode = new Node(data[i], null); last.setNext(newNode); // reset last node last = newNode; } } private static void display() { if(head == null) { System.out.println("No nodes to print in linkedlist"); return; } Node temp = head; while(temp != null) { System.out.print(" " + temp.data); // move next node temp = temp.getNext(); } } private static void displayRecursive(Node head) { if(hea