Question: 1) Create an Arraylist with random numbers, then remove all the odd numbers and sort the Arraylist Input: 3, 11, 26, 12, 99, 345,



1) Create an Arraylist with random numbers, then remove all the odd

1) Create an Arraylist with random numbers, then remove all the odd numbers and sort the Arraylist Input: 3, 11, 26, 12, 99, 345, 36, 5, 18 Output: 12, 18, 26, 36 2) Take two lists as input and return a new list with all values that are only in one of both lists Input: [1, 2, 3, 4] and [1, 4, 5, 9] Output: [2, 3, 5, 9] 3) Get the index of last occurrence of the element in the ArrayList 4) Write a java program to delete all occurrences of a given key in a doubly linked list Input DLL: 2 2 10 8 4 2 5 2 X = 2 Output 10 8 4 5 5) Write a java program to remove duplicates from an unsorted stack. Also sort the stack after removing the duplicates. You must use only Stack operations. Sample: Input: [6, 5, 2, 3, 1, 3, 2, 1, 4, 2, 4, 5] Output: [1, 2, 3, 4, 5, 6] 6) Write a program to reverse the first K elements of a Queue Input: Q = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100] k = 5 Output : Q = [50, 40, 30, 20, 10, 60, 70, 80, 90, 100] 7) Write a java program to reverse a circular linked list Input: head 1 2 3 4 Output: head 4 3 2 1 8) Write a java program to print an array of different type using a single Generic method

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 Programming Questions!