- 博客(12)
- 收藏
- 关注
原创 23. Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.这是一道不难,却很值得思考的题目。包含了很多常见的算法思想。
2017-12-19 06:14:49 408
原创 407. Trapping Rain Water II
Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation map, compute the volume of water it is able to trap after raining.Note: Both m and n are less tha
2017-12-11 12:26:12 197
原创 42. Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,1], retu
2017-12-10 11:49:34 175
原创 173. Binary Search Tree Iterator
mplement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest number in the BST.Note: next() and hasNe
2017-12-08 11:12:16 123
原创 685. Redundant Connection II
leetcode 685 redundant connection II有向图找环路invalid tree 修复
2017-12-04 05:37:42 520
转载 Union-find and Disjoint Set Union
Disjoint Set Union (DSU) is a data structure that keeps track of a set of elements partitioned into a number of disjoint (non-overlapping) subsets. A union-find algorithm is an algorithm that performs
2017-12-03 12:31:45 320
原创 737. Sentence Similarity II
leetcode 737 sentence similarity II 递归写法和非递归写法
2017-12-01 11:25:58 335
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人