Question: please answer below question wih detailed steps, thanks! a) Given an array A of integers of any size, n21, and an integer value x, write
please answer below question wih detailed steps, thanks!

a) Given an array A of integers of any size, n21, and an integer value x, write an algorithm as a pseudo code (not a program!) that would find out the sum of all elements in the array that have values bigger than x, as well as the sum of all elements in the array that have values smaller than x. For instance, assume that array A is as follows: 10 14 35 92 64 r -9, the algorithm would Given find the two sums as 237 and 8. Your algorithm must handle possible special cases. Finally, the algorithm must use the smallest auxiliary/additional storage to perform what is needed. b) What is the time complexity of your algorithm, in terms of Big-O? c What is the space complexity of your algorithm, in terms of Big-0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
