Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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



image

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Auditing and Assurance services an integrated approach

Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley

14th Edition

133081605, 132575957, 9780133081602, 978-0132575959

More Books

Students also viewed these Programming questions

Question

Who was Fritz Haber and what did he do?

Answered: 1 week ago

Question

Draw the basics of the hydrological cycle

Answered: 1 week ago