Question: JAVA The following questions assume that the above code for a LinkList class with singly linked Node's already exists. public class Node public int value;
JAVA

The following questions assume that the above code for a LinkList class with singly linked Node's already exists. public class Node public int value; public Node next; public Node(int value) { this.valuevalue; next-null; public class LinkList private Node head; public LinkList) f head - null; 33. Write a method for the LinkList class to insert a Node at the head of the singly linked list. 34. Write a method for the LinkList class to insert a Node at the head of a singly linked list. The 35. Write a method for the LinkList class to remove the Node at the head of the singly linked list. The function should be called insertHeadNode and take a Node element as the argument. function should be called insertHeadValue and take an integer value as the argument. The function should be called removeHeadValue and return the integer value of the Node just removed (or 0 if the list is empty) 36. Write a method for the LinkList class to return the current length of the list. The function should be called getLength and should return an int
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
