ITADN

Add implementation to count number of subsets achieving maximum knapsack value

#14463Openanikchand461 创建于 2026-03-27
enhancement
A
anikchand461commented
### Feature description The existing knapsack implementation computes only the maximum achievable value. This PR proposes adding a variation that also counts the number of distinct subsets that achieve this optimal value. The implementation will extend dynamic programming logic to track both value and count, and will include proper documentation, type hints, and doctests.
3 条评论