Question: WEAPARTE stands for Write an Efficient Algorithm in Pseudocode, Analyze its Run Time, and Explain. 6. (4 points) You and your friend are given $N
WEAPARTE stands for Write an Efficient Algorithm in Pseudocode, Analyze its Run Time, and Explain.
6. (4 points) You and your friend are given $N by the CIS department. You are told to go to Reading Terminal market and order two distinct items such that the entire $N gets used up. For the purposes of this question we will assume that there is no tax and no tip. Write an algorithm (pseudocode) that will take in an array of all the item prices in Reading Terminal market and determine whether or not it is possible to spend exactly $N by buying 2 items. Please do not use a Hashmap/Hashset for this. WEAPARTE Hint: As a first step, sort the array of prices
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
