1049. Last Stone Weight II

same as leetcode 416, but this one caculate the difference.

time: O(n*m)

space: O(n*m)

second solution

https://leetcode.com/problems/last-stone-weight-ii/discuss/294888/JavaC%2B%2BPython-Easy-Knapsacks-DP

Last updated

Was this helpful?