464. Can I Win
摘要:https://leetcode.com/problems/can-i-win/description/ In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The
阅读全文
152. Maximum Product Subarray
摘要:https://leetcode.com/problems/maximum-product-subarray/description/ Find the contiguous subarray within an array (containing at least one number) whic
阅读全文
34. Search for a Range
摘要:https://leetcode.com/problems/search-for-a-range/description/ Given an array of integers sorted in ascending order, find the starting and ending posit
阅读全文
187. Repeated DNA Sequences
摘要:https://leetcode.com/problems/repeated-dna-sequences/description/ All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for ex
阅读全文
366. Find Leaves of Binary Tree
摘要:https://leetcode.com/problems/find-leaves-of-binary-tree/description/ Given a binary tree, collect a tree's nodes as if you were doing this: Collect a
阅读全文
245. Shortest Word Distance III
摘要:https://leetcode.com/problems/shortest-word-distance-iii/description/ This is a follow up of Shortest Word Distance. The only difference is now word1
阅读全文
101. Symmetric Tree
摘要:https://leetcode.com/problems/symmetric-tree/description/ Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center
阅读全文
53. Maximum Subarray
摘要:https://leetcode.com/problems/maximum-subarray/description/ Find the contiguous subarray within an array (containing at least one number) which has th
阅读全文
205. Isomorphic Strings
摘要:https://leetcode.com/problems/isomorphic-strings/description/ Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic
阅读全文
254. Factor Combinations
摘要:https://leetcode.com/problems/factor-combinations/description/ Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4.
阅读全文
256. Paint House
摘要:https://leetcode.com/problems/paint-house/description/ There are a row of n houses, each house can be painted with one of the three colors: red, blue
阅读全文
156. Binary Tree Upside Down
摘要:https://leetcode.com/problems/binary-tree-upside-down/description/ Given a binary tree where all the right nodes are either leaf nodes with a sibling
阅读全文
170. Two Sum III - Data structure design
摘要:https://leetcode.com/problems/two-sum-iii-data-structure-design/description/ Design and implement a TwoSum class. It should support the following oper
阅读全文
364. Nested List Weight Sum II
摘要:https://leetcode.com/problems/nested-list-weight-sum-ii/description/ Given a nested list of integers, return the sum of all integers in the list weigh
阅读全文
244. Shortest Word Distance II
摘要:https://leetcode.com/problems/shortest-word-distance-ii/description/ This is a follow up of Shortest Word Distance. The only difference is now you are
阅读全文
243. Shortest Word Distance
摘要:https://leetcode.com/problems/shortest-word-distance/description/ Given a list of words and two words word1 and word2, return the shortest distance be
阅读全文
339. Nested List Weight Sum
摘要:https://leetcode.com/problems/nested-list-weight-sum/description/ Given a nested list of integers, return the sum of all integers in the list weighted
阅读全文
199. Binary Tree Right Side View
摘要:https://leetcode.com/problems/binary-tree-right-side-view/description/ Given a binary tree, imagine yourself standing on the right side of it, return
阅读全文
355. Design Twitter
摘要:https://leetcode.com/problems/design-twitter/description/ Design a simplified version of Twitter where users can post tweets, follow/unfollow another
阅读全文
8. String to Integer (atoi)
摘要:https://leetcode.com/problems/string-to-integer-atoi/description/ Implement atoi to convert a string to an integer. Hint: Carefully consider all possi
阅读全文