摘要:
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer... 阅读全文
posted @ 2015-04-22 20:25
Eason Liu
阅读(227)评论(0)推荐(0)
编辑
摘要:
时间限制:10000ms单点时限:1000ms内存限制:256MB描述Given two positive integers N and M, please divide N into several integers A1, A2, ..., Ak (k >= 1), so that:1. 0 ... 阅读全文
posted @ 2015-04-13 17:37
Eason Liu
阅读(415)评论(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 adjacent ... 阅读全文
posted @ 2015-04-08 12:37
Eason Liu
阅读(3075)评论(0)推荐(0)
编辑