Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Write a Java method which inserts a positive integer at the end of a linked list. 3. Write a Java method which displays the

image text in transcribed
image text in transcribed
2. Write a Java method which inserts a positive integer at the end of a linked list. 3. Write a Java method which displays the elements of a linked list. 4. Write a Java method which returns true if a given integer X is in a linked list and false otherwise. 5. Write a Java method which returns the size of a linked list. 6. Write a Java method which calculates and returns the sum of elements in a linked list. 7. Write a Java method which calculates and returns the average of elements in a linked list. 8. Write a Java method which divides a linked list L into two linked lists LD and LU. LD will contain the elements that are less or equal than the average of elements of the linked list L and LU will contain the elements that are greater than the average of elements of the linked list L. The elements must be added in each linked list LD and LU without duplication 9. Write a main method, which you call the above methods to : a. Create a linked list L of N integers. b. Divide the linked list L into two linked list LD and LU. c. Display the elements of two obtained linked list LD and LU

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions