摘要: Description:Count the number of prime numbers less than a non-negative number,n.传送门:https://leetcode.com/problems/count-primes/尽可能把查找次数缩小,直接用双重for会超时。... 阅读全文
posted @ 2015-08-05 09:54 zetrov 阅读(189) 评论(0) 推荐(0) 编辑
摘要: There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to firs... 阅读全文
posted @ 2015-08-05 09:34 zetrov 阅读(334) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and al... 阅读全文
posted @ 2015-08-05 09:32 zetrov 阅读(319) 评论(0) 推荐(0) 编辑