摘要:
Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defi 阅读全文
posted @ 2018-03-11 20:32
bonelee
阅读(203)
评论(0)
推荐(0)
摘要:
高级语法 除了像上面介绍的 [x ** 2 for x in L] 这种基本语法之外,列表推导式还有一些高级的扩展。 4.1. 带有if语句 我们可以在 for 语句后面跟上一个 if 判断语句,用于过滤掉那些不满足条件的结果项。 例如,我想去除列表中所有的偶数项,保留奇数项,可以这么写: >>> 阅读全文
posted @ 2018-03-11 18:33
bonelee
阅读(36065)
评论(5)
推荐(13)
摘要:
Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: Note: 解法1: 精简版: 解法2: DFS 使用一个数组 阅读全文
posted @ 2018-03-11 17:49
bonelee
阅读(434)
评论(0)
推荐(0)

浙公网安备 33010602011771号