摘要: Strobogrammatic Number II give us all the strings with length n, then we can call it to get strings with length between low.length() and high.length() 阅读全文
posted @ 2017-11-27 13:04 apanda009 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 参考http://segmentfault.com/a/1190000003787462 找出所有的可能,必然是深度优先搜索。但是每轮搜索如何建立临时的字符串呢?因为数是“对称”的,我们插入一个字母就知道对应位置的另一个字母是什么,所以我们可以从中间插入来建立这个临时的字符串。这样每次从中间插入两个 阅读全文
posted @ 2017-11-27 12:56 apanda009 阅读(170) 评论(0) 推荐(0) 编辑
摘要: A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to determine if a number is strobogrammatic. The number is represented as ... 阅读全文
posted @ 2017-11-27 12:48 apanda009 阅读(134) 评论(0) 推荐(0) 编辑