摘要: 一个矩阵,求最长连续的序列长度 [1 2 3 4 5 6 7 8 9] 我的解法时用dfs遍历矩阵,如果便利过的元素就标记为false,不再遍历。 邻居 就是上下左右 e.g. 1 2 3 6 5 4 -> 7 7 9 8 =================== 5 7 9 1 2 3 -> 3 4 阅读全文
posted @ 2016-04-03 06:24 Joyce-Lee 阅读(225) 评论(0) 推荐(0) 编辑
摘要: If you need to maintain a list of objects that are sorted and unique & if you need to be able to quickly insert and retrieve objects to and from this 阅读全文
posted @ 2016-04-03 03:16 Joyce-Lee 阅读(317) 评论(0) 推荐(0) 编辑