Question: CLAFLIN UNIVERSITY CscI 237 DATA STRUCTURES AND ALGORITHMS TEST 3- FALL 2017 (Q1, Q2,03,04 each 25 points) 4 Consider two sums, x = X1 +

CLAFLIN UNIVERSITY CscI 237 DATA STRUCTURES AND ALGORITHMS TEST 3- FALL 2017 (Q1, Q2,03,04 each 25 points) 4 Consider two sums, x = X1 + X2 ++ xn and Y = y1 +Y2 + . . ty'm. Give an algorithm that finds (cos) indices i and j such that swapping x, with y, makes the two sums equal, that is, X-x yY -y+ X, if they exist. Analyze your algorithm. (You can use sorting as a subroutine. The amount of credit depends on the correctness of the analysis and the run-time of your algorithm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
