摘要:
编解码法 复杂度 时间 O(NN) 空间 O(1) 思路 最简单的方法是再建一个矩阵保存,不过当inplace解时,如果我们直接根据每个点周围的存活数量来修改当前值,由于矩阵是顺序遍历的,这样会影响到下一个点的计算。如何在修改值的同时又保证下一个点的计算不会被影响呢?实际上我们只要将值稍作编码就行了 阅读全文
posted @ 2015-12-27 13:18
neverlandly
阅读(502)
评论(0)
推荐(0)
摘要:
There is a new alien language which uses the latin alphabet. However, the order among letters are unknown to you. You receive a list of words from the... 阅读全文
posted @ 2015-12-27 12:05
neverlandly
阅读(573)
评论(0)
推荐(0)
摘要:
An abbreviation of a word follows the form . Below are some examples of word abbreviations:a) it --> it (no abbreviation) ... 阅读全文
posted @ 2015-12-27 07:14
neverlandly
阅读(382)
评论(0)
推荐(0)