Question: Please help with both 1 and 2! 1. (2 points) Let A be an array of size n 2 6 containing integers from 1 ton-5,
Please help with both 1 and 2!

1. (2 points) Let A be an array of size n 2 6 containing integers from 1 ton-5, inclusive with exactly five repeated. Describe an O(n) algorithm for finding the five integers in A that are repeated. (Goodrich, p. 150) 2. (2 points) Given a list L of n arbitrary integers, describe an O(n) time function for finding an integer that cannot be formed as the sum of two integers in L. (Goodrich, p. 266)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
