Sort 72 Discussions, By:
Please Login in order to post a comment
hint1 : the problem is a variation of dividing a set of into two subsets such that the difference between the sum of sets is minimum
hint2 : recursive approac will time out, use iterative approach
Can some one please expalain the example test case ?
Can some one tell me why total sum divided by two will not work?
Please share an example? I can't make an example myself
Could any prove that the greddy solution dosen't work. NOt by test_case approach but using a proof.
I have the following idea Every robber has to stay to in chamber for a[i] minutes. I sort the data in the decreasing order of a[i]. Now i select the 2 top most robber let's say a[i], a[j]. Let a[i] > a[j] now a[j] finishes first robber r_i still needs to stay a[i] - a[j] seconds more. Now i chosse a[k]. I don't see how the choice of a[k] matters. Can anyone explain this to me.
Сan I find a dating site or app somewhere? I am satisfied with such a relationship, so I will be happy if I can find such an application.