doubly_ll.java - Write a Java program for the following: a. Create a doubly linked list of elements.
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
1
Enter the value to be inserted first:50
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
2
Enter item after which an element is to be inserted:50
Value to be inserted:51
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
2
Enter item after which an element is to be inserted:51
Value to be inserted:52
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
2
Enter item after which an element is to be inserted:52
Value to be inserted:53
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
2
Enter item after which an element is to be inserted:53
Value to be inserted:54
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
4
50-->51-->52-->53-->54
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
5
54<--53<--52<--51<--50
b. Delete a given element from the above list.
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
4
50-->51-->52-->53-->54
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
5
54<--53<--52<--51<--50
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
6
Enter the value to be deleted:52
doubly_ll.java - Display the contents of the list after deletion.
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
4
50-->51-->52-->53-->54
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
6
Enter the value to be deleted:52
Doubly LinkedList Operations are:
1.Insfirst
2.InsAfter
3.InsBefore
4.TraverseRight
5.TraverseLeft
6.Delete
7.Exit
Enter your choice:
4
50-->51-->53-->54
quicksort.java - Write a Java program that implements Quick sort algorithm for sorting a list of names in ascending order.
Enter the number of element in the array : 5
Enter the array elements : 8
4
7
5
2
The Sorted Array is 2 4 5 7 8
binary_search.java - Write a Java program that implements the binary search algorithm.
Enter the size:7
Enter the elements:1
2
3
4
5
6
7
Enter the item to be searched:6
6 is found at position 6