2015年5月6日

Maximum Gap

摘要: Maximum Gap问题:Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/s... 阅读全文

posted @ 2015-05-06 23:33 zhouzhou0615 阅读(111) 评论(0) 推荐(0) 编辑

Count Primes

摘要: Count Primes问题:Count the number of prime numbers less than a non-negative number,n思路: 计算质数的方法:http://en.wikipedia.org/wiki/Prime_number我的代码:public cl... 阅读全文

posted @ 2015-05-06 11:28 zhouzhou0615 阅读(127) 评论(0) 推荐(0) 编辑

Surrounded Regions

摘要: Surrounded Regions问题:Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in t... 阅读全文

posted @ 2015-05-06 10:22 zhouzhou0615 阅读(202) 评论(0) 推荐(0) 编辑

导航