We are given N stacks of variable length. We need to choose M element such that sum is maximum.
stack a) 1 2 200
stack b) 5 10 7
stack c) 4 6
the answer will be 1+2+200 = 203 .
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.Sign up to join this community