Find the list of numbers whose sum is equal to given number.
Well you all have seen the problem where we need to find the pair of numbers from the given array or list of numbers such that their sum is equal to given number. Its easy, right? Well it is not that much straight either if you have not seen it earlier a few times & one fumble in that even.
Now what about if you are asked to find the minimum list of numbers whose sum is equal to the given number.
Note - There can be 2, 3 or the whole given list of numbers whose sum is equal to that one number.
How will you do this?
Try....Try...Its an interesting one.
If any one needs the code then leave the message & I will mail the solution which can be helpful in your coding interviews, as approach matters first during such high pressure interviews.
Now what about if you are asked to find the minimum list of numbers whose sum is equal to the given number.
Note - There can be 2, 3 or the whole given list of numbers whose sum is equal to that one number.
How will you do this?
Try....Try...Its an interesting one.
If any one needs the code then leave the message & I will mail the solution which can be helpful in your coding interviews, as approach matters first during such high pressure interviews.