erickwill/Stanford-CS106B-Solutions — pull request #1 by skpro19 (2014-12-21 14:07:23+00:00)
Title: Update 6_CutStock.cpp

The original code is buggy. input the following values -> (StockPipe Length = 10, PipeLengths -> {4,3,4,1,7,8,2} ). The code will give an output of 4, but the answer should be 3 because the following groups can be formed -> {4,4,1}, {7,3}, {8,2}.
This problem is arising because there is a bug in the "PermuteVector" function. Instead of creating a temporary copy of "prefix" and "rest" and then passing it passing it recursively, you are passing it directly. I have added two new lines at 51 & 53.