Examveda

Consider a variation of the balanced partition problem in which we find two subsets such that |S1 - S2| is minimum. Consider the array {1, 2, 3, 4, 5}. Which of the following pairs of subsets is an optimal solution for the above problem?

A. {5, 4} & {3, 2, 1}

B. {5} & {4, 3, 2, 1}

C. {4, 2} & {5, 3, 1}

D. {5, 3} & {4, 2, 1}

Answer: Option D


Join The Discussion

Related Questions on Dynamic Programming in Data Structures