Question: please help me with this java Qustion Complete the following classes: class Node { T data; Node next; public Node (T x,Node n){} //init the

please help me with this java Qustion Complete the following classes: classplease help me with this java Qustion

Complete the following classes: class Node { T data; Node next; public Node (T x,Node n){} //init the node with the given data } class Linkedlist { Node head; int size; public Linkedlist(){} //creates empty linked list public Linkedlist(Node n){} //creates linked list with a given node public void add( int index,Node n){} //adds a node at the ith index of the list public void delete( int ith ){} //deletes ith index node from the list public int search (T d){} //return the index if first node with d otherwise-1 public void print(){} //print the list from head to tail recursively public void revPrint(){} //print the list from tail to head recursively }; Write the main such that it tests all the methods in the class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!