1.

In which of the following cases, it is not possible to have two subsets with equal sum?(a) When the number of elements is odd(b) When the number of elements is even(c) When the sum of elements is odd(d) When the sum of elements is evenThis question was addressed to me in final exam.My question is from Balanced Partition in chapter Dynamic Programming of Data Structures & Algorithms II

Answer»

The correct choice is (C) When the sum of elements is odd

To explain: When the sum of all the elements is odd, it is not POSSIBLE to have TWO SUBSETS with EQUAL sum.



Discussion

No Comment Found

Related InterviewSolutions