LeetCode "488. Zuma Game" !
2017-01-22 12:08
537 查看
I prefer shorter code, so this one:
https://discuss.leetcode.com/topic/75448/memoization-c-solution
Please note: we don't want to be too greedy - desperately shrink the string from one side - no, that may not be a global optimal solution. So, we simply do DFS, putting char from hand into each slot - however, we always put same char, not new char, because we are trying to accumulate, not creating new one.
https://discuss.leetcode.com/topic/75448/memoization-c-solution
Please note: we don't want to be too greedy - desperately shrink the string from one side - no, that may not be a global optimal solution. So, we simply do DFS, putting char from hand into each slot - however, we always put same char, not new char, because we are trying to accumulate, not creating new one.
相关文章推荐
- [LeetCode-Algorithms-55] "Jump Game" (2017.11.7-WEEK10)
- LeetCode "Game of Life"
- [Leetcode] 488. Zuma Game 解题报告
- leetcode 488. Zuma Game 祖玛游戏 + 递归做法
- 【LeetCode】488. Zuma Game
- [leetcode]488. Zuma Game
- LeetCode "Jump Game II"
- leetcode 488. Zuma Game(祖玛游戏)
- 488. Zuma Game(leetcode DFS hard)
- LeetCode "Flip Game II"
- LeetCode "Jump Game"
- LeetCode "Nim Game"
- LeetCode "Third Maximum Number"
- LeetCode-Design Snake Game
- LeetCode 390. Elimination Game
- error LNK2005: "int dir" (?dir@@3HA) already defined in GameStart.obj
- [leetcode] NimGame
- CareerCup Old cell-phones game "snake"
- LeetCode 292. Nim Game
- error LNK2001: 无法解析的外部符号 "public: virtual int __thiscall Game::LevelTwo(void)"