Knapsack problem/Unbounded: Difference between revisions

Content added Content deleted
(Undo revision 263806 by Cloudius (talk)Roll back all but Scala updates for reason given in last rollback)
Line 3,532: Line 3,532:
=={{header|Scala}}==
=={{header|Scala}}==


'''Functional approach''' (Tail recursive)
===Functional approach (Tail recursive)===


<lang scala>import scala.annotation.tailrec
<lang scala>import scala.annotation.tailrec