In this problem you have n sorted numbers a1 S a2 S S an and
In this problem, you have n sorted numbers a1 S a2 S. S an and n mutually distinct weights wi, W2,..., w. The minimum weighted-sum problem s and w\'s as input, and matching each number ai with a unique weight w,such that the sum of w,a is minimized. In this exercise, you will be asked to develop a greedy algorithm for the minimum weighted-sum problem. is the problem of taking the a
Solution
TIME COMPLXITY OF ALGORITHM: O(n)
