Jump to content

Knapsack problem/Unbounded: Difference between revisions

m
→‎{{header|Perl 6}}: circumfix chars clobbered
m (→‎{{header|Perl 6}}: circumfix chars clobbered)
Line 2,672:
 
=={{header|Perl 6}}==
{{Works with|rakudo|20162019.0803.1}}
Brute force, looked a lot at the Ruby solution.
 
Line 2,696:
 
for $panacea, $ichor, $gold -> $item {
%max_items{$item.name} = floor [min]
$maximum.volume / $item.volume,
$maximum.weight / $item.weight;
2,392

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.