自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(113)
  • 收藏
  • 关注

原创 145. Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes' values.Example:Input: [1,null,2,3] 1 \ 2 / 3Output: [3,2,1]# Definition for a binary tree node.# class ...

2018-08-31 23:13:11 54

原创 144. Binary Tree Preorder Traversal

https://leetcode.com/problems/binary-tree-preorder-traversal/description/Given a binary tree, return the preorder traversal of its nodes' values.Example:Input: [1,null,2,3] 1 \ 2 ...

2018-08-31 23:10:41 47

原创 143. Reorder List

https://leetcode.com/problems/reorder-list/description/Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You may not modify the values in the list's nodes, only ...

2018-08-31 23:06:27 63

原创 142. Linked List Cycle II

https://leetcode.com/problems/linked-list-cycle-ii/description/Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list....

2018-08-31 22:41:02 64

原创 141. Linked List Cycle

https://leetcode.com/problems/linked-list-cycle/description/Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?# Definition for singly-...

2018-08-31 22:29:15 103

原创 140. Word Break II

https://leetcode.com/problems/word-break-ii/description/Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each ...

2018-08-30 22:17:08 64

原创 139. Word Break

https://leetcode.com/problems/word-break/description/Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated...

2018-08-30 21:25:53 87

原创 138. Copy List with Random Pointer

https://leetcode.com/problems/copy-list-with-random-pointer/description/A linked list is given such that each node contains an additional random pointer which could point to any node in the list or ...

2018-08-30 20:16:34 73

原创 137. Single Number II

https://leetcode.com/problems/single-number-ii/description/Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one.N...

2018-08-30 19:27:16 78

原创 136. Single Number

https://leetcode.com/problems/single-number/description/Given a non-empty array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a li...

2018-08-30 19:19:39 64

原创 135. Candy

https://leetcode.com/problems/candy/description/There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following r...

2018-08-29 22:45:28 72

原创 134. Gas Station

https://leetcode.com/problems/gas-station/description/There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and ...

2018-08-29 22:35:55 80

转载 133. Clone Graph

https://leetcode.com/problems/clone-graph/description/Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are...

2018-08-29 22:27:32 68

转载 132. Palindrome Partitioning II

https://leetcode.com/problems/palindrome-partitioning-ii/description/Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a p...

2018-08-29 20:35:16 56

原创 131. Palindrome Partitioning

https://leetcode.com/problems/palindrome-partitioning/description/Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioni...

2018-08-29 20:34:32 72

原创 130. Surrounded Regions

https://leetcode.com/problems/surrounded-regions/description/Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'.A region is captured by flipping all 'O's...

2018-08-28 21:28:18 61

原创 129. Sum Root to Leaf Numbers

https://leetcode.com/problems/sum-root-to-leaf-numbers/description/Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-le...

2018-08-28 21:25:35 74

转载 128. Longest Consecutive Sequence

https://leetcode.com/problems/longest-consecutive-sequence/description/Given an unsorted array of integers, find the length of the longest consecutive elements sequence.Your algorithm should run i...

2018-08-28 21:23:43 89

转载 127. Word Ladder

https://leetcode.com/problems/word-ladder/description/Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to end...

2018-08-28 21:22:53 99

转载 126. Word Ladder II

https://leetcode.com/problems/word-ladder-ii/description/Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord...

2018-08-28 21:21:57 84

原创 122. Best Time to Buy and Sell Stock II

https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/description/Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the ...

2018-08-26 18:25:10 80

原创 121. Best Time to Buy and Sell Stock

https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to compl...

2018-08-26 18:24:27 70

原创 125. Valid Palindrome

https://leetcode.com/problems/valid-palindrome/description/Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.Note: For the purpose of thi...

2018-08-26 18:22:54 154

转载 124. Binary Tree Maximum Path Sum

https://leetcode.com/problems/binary-tree-maximum-path-sum/description/Given a non-empty binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from so...

2018-08-26 18:22:12 66

转载 123. Best Time to Buy and Sell Stock III

https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/description/Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the...

2018-08-26 15:54:47 289

原创 120. Triangle

https://leetcode.com/problems/triangle/description/Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given th...

2018-08-26 09:28:54 64

原创 119. Pascal's Triangle II

https://leetcode.com/problems/pascals-triangle-ii/description/Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle.Note that the row index starts from 0....

2018-08-26 09:27:59 72

原创 118. Pascal's Triangle

https://leetcode.com/problems/pascals-triangle/description/Given a non-negative integer numRows, generate the first numRows of Pascal's triangle.In Pascal's triangle, each number is the sum of th...

2018-08-26 09:27:03 72

转载 117. Populating Next Right Pointers in Each Node II

https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/description/Given a binary treestruct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next...

2018-08-26 09:26:18 77

原创 116. Populating Next Right Pointers in Each Node

https://leetcode.com/problems/populating-next-right-pointers-in-each-node/description/Given a binary treestruct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next;}...

2018-08-26 09:24:17 197

转载 115. Distinct Subsequences

https://leetcode.com/problems/distinct-subsequences/description/Given a string S and a string T, count the number of distinct subsequences of S which equals T.A subsequence of a string is a new st...

2018-08-24 21:44:39 83

转载 114. Flatten Binary Tree to Linked List

https://leetcode.com/problems/flatten-binary-tree-to-linked-list/description/Given a binary tree, flatten it to a linked list in-place.For example, given the following tree: 1 / \ 2 5...

2018-08-24 20:36:22 58

原创 113. Path Sum II

https://leetcode.com/problems/path-sum-ii/description/Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.Note: A leaf is a node with no children....

2018-08-24 20:32:36 94

原创 112. Path Sum

https://leetcode.com/problems/path-sum/description/Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum...

2018-08-24 20:31:44 64

原创 111. Minimum Depth of Binary Tree

https://leetcode.com/problems/minimum-depth-of-binary-tree/description/Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root no...

2018-08-24 20:30:54 99

原创 110. Balanced Binary Tree

https://leetcode.com/problems/balanced-binary-tree/description/Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as:a binary tre...

2018-08-24 20:29:55 99

原创 109. Convert Sorted List to Binary Search Tree

https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/description/Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.For...

2018-08-24 20:28:25 73

原创 108. Convert Sorted Array to Binary Search Tree

https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/description/Given an array where elements are sorted in ascending order, convert it to a height balanced BST.For this probl...

2018-08-24 20:27:23 69

原创 107. Binary Tree Level Order Traversal II

https://leetcode.com/problems/binary-tree-level-order-traversal-ii/description/Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by...

2018-08-24 20:26:16 77

原创 106. Construct Binary Tree from Inorder and Postorder Traversal

https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/description/Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume...

2018-08-22 22:27:24 96

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除