Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello! I'm having issues withe the implementation and any help is appreciated. For this assignment, we will implement a few simple algorithms and determine the

Hello! I'm having issues withe the implementation and any help is appreciated.

For this assignment, we will implement a few simple algorithms and determine the Big-O running time.

image text in transcribed

For this assignment, the methods you write can be placed above the main method in the Main.java file. You DO NOT need to create a separate class for these methods. You will need to make sure you write all the structured comments for the methods. The methods you write should implement the functionality. Meaning, do not use internal libraries to solve the problem, solve the problem yourself. Write methods to perform the following: O NOTE: For each method you implement, you need to give the run time. You need to justify your running time and how you calculated it. o Convert a string to lower case. String tolower(String value) O Return the index of the minimum value in a List of integers, return -1 if the List is empty. . int getMinIndex(List list) o Remove all duplicate values from an array of integers. void removeDuplicates (int list[]) . For example, if the array has the values 4 7 11 4 9 5 11 7 3 5 then the array should be changed to 4 7 11 9 5 3 O Calculate the average of an array of doubles. . double getAverage (double list[]) o Compute the alternating sum of all even or odd elements in a List of integers. . int getAlternateSum(List list) For example, if the vector contains 149 16 9 749 11 then it computes 1-4+9-16 + 9-7+ 4-9 + 11 = -2

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

More Books

Students also viewed these Databases questions

Question

d. What language(s) did they speak?

Answered: 1 week ago