
Union Find
文章平均质量分 73
dyllanzhou
这个作者很懒,什么都没留下…
展开
-
[Leetcode]Number of Islands
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 lands horizontally or vertically. You may assume原创 2015-09-01 12:38:40 · 292 阅读 · 0 评论 -
[Leetcode]Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest consecutive elements sequence is [1, 2, 3,原创 2015-12-17 20:06:59 · 454 阅读 · 0 评论