摘要: Count the number of prime numbers less than a non-negative number, n. Example: "这道题给定一个非负数n,让我们求小于n的质数的个数,题目中给了充足的提示,解题方法就在第二个提示埃拉托斯特尼筛法Sieve of Erato 阅读全文
posted @ 2019-04-16 06:29 Schwifty 阅读(124) 评论(0) 推荐(0)
摘要: Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文
posted @ 2019-04-16 02:32 Schwifty 阅读(90) 评论(0) 推荐(0)