Question: Q 1 ) write a java program that create a single linked list program that asks the user to choose an option from the following

Q1) write a java program that create a single linked list program that asks the user to choose an option from the following list, 9 to exit the loop:
Write a method to add a node at the beginning.
Write a method to add a not at last.
Write a method to add a node at any random location.
Write a method to delete a node from the beginning.
Write a method to delete a node from last.
Write a method to delete a node after specified location.
Write a method to search for an element and prints the result.
Write a method to display the linked list.
?** Submit .java files only.
Output:
*************************** Main Menu **************************
Choose one option from the following list...
Add at first
Add at last
3.Add at any random location
Delete from first
Delete from last
Delete node after specified location
Search for an element
8.display
9.Exit
Enter your choice?
1
Enter value
1
Node inserted
Main Menu ***************************
 Q1) write a java program that create a single linked list

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!