Post, Code and Quiet Time.
  • Home
Sign in Subscribe

Backpack

A collection of 1 post
Backpack

Backpack Problem

Question: give two integer n and m, select rand numbers from 1,2,3,...,n-1, n, let the sum of the combination is equal to m. print out all possible combinations. Examples: n = 8 m = 10 8 2 7 3 7 2 1 6 4 6 3 1 5 4
Nov 3, 2017 1 min read
Page 1 of 1
Post, Code and Quiet Time. © 2023
Powered by Ghost