Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

finding subsets in an array

$
0
0

Pls suggest an algorithm to find the maximum no. of subset of length k in an array of length m where k<=m , having sum equal to a constant factor...

e.g an array of length 11

2 5 1 2 4 1 6 5 2 2 1

k=6, constant factor = sum of largest k values in the array= 6 + 5 + 5 + 4 + 2 + 2 = 24 ??


Viewing all articles
Browse latest Browse all 39796

Trending Articles