Given an integer array;partition it into two of equal sized arrays such that their sum is maximum
Answers
Answered by
0
Answer:
Explanation:Partition problem is to determine whether a given set can be partitioned into two subsets such that the sum of elements in both subsets is same.
Examples:
arr[] = {1, 5, 11, 5}
Output: true
The array can be partitioned as {1, 5, 5} and {11}
arr[] = {1, 5, 3}
Output: false
The array cannot be partitioned into equal sum sets
Similar questions
Environmental Sciences,
4 months ago
English,
4 months ago
Computer Science,
9 months ago
English,
1 year ago