an array a is given:
A = [98, 50, 173, 392, 55, 105, 150, 450]
B=?
C=[]
D = 2522
we have to generate array C whose sum of all is given which is D.
we have to also find B(An element) which is the element that will be swapped with element in A if element
in A is smaller than B.otherwise no swapping ,append the same element .
this process is done to get array C.
sum of array(C) == D
PSUEDOCODE:
for ele in A:
if ele <B:
C.append(B)
else:
C.append(ele)FIND : B,C