Introduction - If you have any usage issues, please Google them yourself
Knapsack problem using backtracking solution assumption has n items, the definition of a structure a [] to store, structure, body weight and has two members value (weight, said weight, value, said value) before the definition of an array col [] mean that each and every item current status (as one said to be elected, not selected to express to 0), all of its initial value 1, from the beginning subscript 0 ergodicity, the currently selected items and the total value of gross weight, respectively, as tw and tv (early values are 0), backpack weight limit is set to limit, if paragraph i of goods to meet tw+ a [i]. weight
Packet : 1032448492.rar filelist
2\2.cpp
2\2.dsp
2\2.dsw
2\2.ncb
2\2.opt
2\2.plg
2\Debug
2