标签: leetcode
-
102. Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal o…
-
143. Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder i…
-
【Leetcode】95~96 不同的二叉搜索树
Leetcode 95 不同的二叉搜索树 II 输入: 3输出: {代码…} 解释:以上的输出对应以下 5…
-
148. Sort List
Sort a linked list in O(n log n) time using constant sp…
-
144. Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of i…
-
用Backtracking思想解决subset/permutation/combination/partition问题
出口条件:出口条件还是挺容易,如全排列中list的长度为nums的length就把它加入到result lis…
-
leetcode381. Insert Delete GetRandom O(1) – Duplicates allowed
设计一个数据结构,支持能够在O(1)的时间内完成对数字的插入,删除和获取随机数的操作,允许插入重复的数字,同时…
-
150. Evaluate Reverse Polish Notation
Evaluate the value of an arithmetic expression in Rever…
-
147. Insertion Sort List
Sort a linked list using insertion sort.A graphical exa…
-
151. Reverse Words in a String
Given an input string, reverse the string word by word.…