Question: Problem 5 Design an algorithm that takes a list of integers as input A = ( a 1 , a 2 , a 3 ,

Problem 5 Design an algorithm that takes a list of integers as input A=(a1, a2, a3, a4, a5,..., an) along with a target value x. Your algorithm must locate a pair of integers in A that sum to the value x or report that there is no such pair. For example if A=(1,11,-2,12,8,9) and x=10, then your algorithm should report back either (1,9) or (-2,12). Write your algorithm out in pseudocode (bulleted english is fine).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!