Page 1 of 1

1. please help me get the correct code that runs correctly

Posted: Tue Jul 05, 2022 10:26 am
by answerhappygod
1.
please help me get the correct code that runs correctly
1 Please Help Me Get The Correct Code That Runs Correctly 1
1 Please Help Me Get The Correct Code That Runs Correctly 1 (58.61 KiB) Viewed 16 times
1) Write code for the functions described below and determine its Big-O. Please justify your response for full credit. Specifically, once you have developed the code, count the approximate number of operations needed to execute it (12 pts): a. An int returning function that takes in an integer array and finds the smallest value in that array. b. A void function that takes in an array of n integers and finds the sum of all the elements in the array. c. A void function that takes in a double value and outputs the square root of that number, that is if it is non-negative. If it is negative, then it is to output a message saying that the square root cannot be found. d. A double function that takes in a two-dimensional integer array of n rows and n columns and iterates through it using a double for loop. As the array is being searched through, all of the elements are summed up. Once all of the elements are added together, the sum is divided by the total number of elements in the array.