1049. Last Stone Weight II
Problem Link
Solution 1: DFS
class Solution:
def lastStoneWeightII(self, stones: List[int]) -> int:
memo = dict()
return self.helper(stones, 0, 0, 0, memo)
def helper(self, stones, i, S1, S2, memo) -> int:
if (i, S1, ...
superbcoder.hashnode.dev1 min read