摘要:
编解码法 复杂度 时间 O(NN) 空间 O(1) 思路 最简单的方法是再建一个矩阵保存,不过当inplace解时,如果我们直接根据每个点周围的存活数量来修改当前值,由于矩阵是顺序遍历的,这样会影响到下一个点的计算。如何在修改值的同时又保证下一个点的计算不会被影响呢?实际上我们只要将值稍作编码就行了 阅读全文
摘要:
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... 阅读全文
摘要:
An abbreviation of a word follows the form . Below are some examples of word abbreviations:a) it --> it (no abbreviation) ... 阅读全文