Question: I need the answer for a and b, thank you 8. Problem Let A be an array of size n storing positive integers. rite, in
8. Problem Let A be an array of size n storing positive integers. rite, in pseudocode, an algorithm Check(A,n, m) that takes as input array A storing A storing integer size n, and another integer m. Your algorithm should return true if there are of A that add up to m, and false otherwise. For example, if A (5,4,7) then Che should return true since A[O] + ARI= s + 7-12, and Check(A, 3.2) should retu since no two elements of A add up to 2. You are allowed to use only O(1) of add This means that you can use a few variables, but you cannot declare arrays or any o rn false itional m memd Only a D structures whose size depends on n . 3 Give the best Big-Oh characterization of the worst case time complexity of your algorithm above. Express the complexity as a function of the array size. Explain how you computed th time complexity of your algorithm. b
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
