摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Note: Solution: 阅读全文
posted @ 2016-08-15 13:58 LiBlog 阅读(140) 评论(0) 推荐(0) 编辑
摘要: A 2d grid map of m rows and n columns is initially filled with water. We may perform an addLand operation which turns the water at position (row, col) 阅读全文
posted @ 2016-08-15 13:42 LiBlog 阅读(258) 评论(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 @ 2016-08-15 12:19 LiBlog 阅读(130) 评论(0) 推荐(0) 编辑
摘要: For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible roote 阅读全文
posted @ 2016-08-15 11:50 LiBlog 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Design a Snake game that is played on a device with screen size = width x height. Play the game online if you are not familiar with the game. The snak 阅读全文
posted @ 2016-08-15 09:45 LiBlog 阅读(231) 评论(0) 推荐(0) 编辑