Move the sliders or press "S" to set settings Green flag to run again Turbo mode suggested (Shift+Click flag) Note: The "sum out" variable is updated when the code terminates, it's not real-time. @kc021 's instructions: By suggestion of @Raihan142857, I have created my first general coding challenge! Solve a case of the knapsack problem; in particular, find a set of items in the Prices list whose prices sum to the Sum input. Output this set in the Prices To Sum list. The goals are shortest code, most efficient code, and fastest code. If there is no such set, then output an empty list. Your code must be able to handle all real numbers. (Negative prices exist in this awesome world.) You may buy an item twice.
This project is based on efficiency, so there are A LOT of blocks. Feel free to count them if you have time to waste :) This would probably take a whole 3-page paper to explain, and, you know what, some things are better left unknown... (I can explain in the comments if you want) Unfortunately, the project will not terminate if there is no solution because maybe, just maybe, there could be a solution if it goes deep enough, so it will keep going forever.