码迷,mamicode.com
首页 > 其他好文 > 详细

LeetCode "488. Zuma Game" !

时间:2017-01-22 13:34:33      阅读:295      评论:0      收藏:0      [点我收藏+]

标签:code   str   ant   this   creat   string   eve   lob   new   

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.

LeetCode "488. Zuma Game" !

标签:code   str   ant   this   creat   string   eve   lob   new   

原文地址:http://www.cnblogs.com/tonix/p/6339920.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!