In the Knapsack example, the secondary array displays the capacity and value of the items. However, since we cannot make the DPArray store tuples or strings. The current workaround is to put this information in the column labels, which does accept strings.
It would be more ideal if the capacity and value are displayed on the cells in the format (2,4) or capacity=2, value=4.
Problem
In the Knapsack example, the secondary array displays the capacity and value of the items. However, since we cannot make the DPArray store tuples or strings. The current workaround is to put this information in the column labels, which does accept strings.
It would be more ideal if the capacity and value are displayed on the cells in the format
(2,4)
orcapacity=2, value=4
.Solution
Allow DPArray to accept string as datatype.