logo资料库

_leetcode-python.pdf

第1页 / 共413页
第2页 / 共413页
第3页 / 共413页
第4页 / 共413页
第5页 / 共413页
第6页 / 共413页
第7页 / 共413页
第8页 / 共413页
资料共413页,剩余部分请下载后查看
Introduction
001 Two Sum
002 Add Two Numbers
003 Longest Substring Without Repeating Characters
004 Median of Two Sorted Arrays
005 Longest Palindromic Substring
006 ZigZag Conversion
007 String to Integer (atoi)
008 Reverse Integer
009 Palindrome Number
010 Regular Expression Matching
011 Container With Most Water
012 Integer to Roman
013 Roman to Integer
014 Longest Common Prefix
015 3Sum
016 3Sum Closest
017 Letter Combinations of a Phone Number
018 4Sum
019 Remove Nth Node From End of List
020 Valid Parentheses
021 Merge Two Sorted Lists
022 Generate Parentheses
023 Merge k Sorted Lists
024 Swap Nodes in Pairs
025 Reverse Nodes in k-Group
026 Remove Duplicates from Sorted Array
027 Remove Element
028 Implement strStr()
029 Divide Two Integers
030 Substring with Concatenation of All Words
031 Next Permutation
032 Longest Valid Parentheses
033 Search in Rotated Sorted Array
034 Search for a Range
035 Search Insert Position
036 Valid Sudoku
037 Sudoku Solver
038 Count and Say
039 Combination Sum
040 Combination Sum II
041 First Missing Positive
042 Trapping Rain Water
043 Multiply Strings
044 Wildcard Matching
045 Jump Game II
046 Permutations
047 Permutations II
048 Rotate Image
049 Group Anagrams
050 Pow(X, n)
051 N-Queens
052 N-Queens II
053 Maximum Subarray
054 Spiral Matrix
055 Jump Game
056 Merge Intervals
057 Insert Interval
058 Length of Last Word
059 Spiral Matrix II
060 Permutation Sequence
061 Rotate List
062 Unique Paths
063 Unique Paths II
064 Minimum Path Sum
065 Valid Number
066 Plus One
067 Add Binary
068 Text Justification
069 Sqrt(X)
070 Climbing Stairs
071 Simplify Path
072 Edit Distance
073 Set Matrix Zeroes
074 Search a 2D Matrix
075 Sort Colors
076 Minimum Window Substring
077 Combinations
078 Subsets
079 Word Search
080 Remove Duplicates from Sorted Array II
081 Search in Rotated Sorted Array II
082 Remove Duplicates from Sorted List II
083 Remove Duplicates from Sorted List
084 Largest Rectangle in Histogram
085 Maximal Rectangle
086 Partition List
087 Scramble String
088 Merge Sorted Array
089 Gray Code
090 Subsets II
091 Decode Ways
092 Reverse Linked List II
093 Restore IP Addresses
094 Binary Tree Inorder Traversal
095 Unique Binary Search Trees II
096 Unique Binary Search Trees
097 Interleaving String
098 Validate Binary Search Tree
099 Recover Binary Search Tree
100 Same Tree
101 Symmetric Tree
102 Binary Tree Level Order Traversal
103 Binary Tree Zigzag Level Order Traversal
104 Maximum Depth of Binary Tree
105 Construct Binary Tree from Preorder and Inorder Traversal
106 Construct Binary Tree from Inorder and Postorder Traversal
107 Binary Tree Level Order Traversal II
108 Convert Sorted Array to Binary Search Tree
109 Convert Sorted List to Binary Search Tree
110 Balanced Binary Tree
111 Minimum Depth of Binary Tree
112 Path Sum
113 Path Sum II
114 Flatten Binary Tree to Linked List
115 Distinct Subsequences
116 Populating Next Right Pointers in Each Node
117 Populating Next Right Pointers in Each Node II
118 Pascal's Triangle
119 Pascal's Triangle II
120 Triangle
121 Best Time to Buy and Sell Stock
122 Best Time to Buy and Sell Stock II
123 Best Time to Buy and Sell Stock III
124 Binary Tree Maximum Path Sum
125 Valid Palindrome
126 Word Ladder II
127 Word Ladder
128 Longest Consecutive Sequence
129 Sum Root to Leaf Numbers
130 Surrounded Regions
131 Palindrome Partitioning
132 Palindrome Partitioning II
133 Clone Graph
134 Gas Station
135 Candy
136 Single Number
137 Single Number II
138 Copy List with Random Pointer
139 Word Break
140 Word Break II
141 Linked List Cycle
142 Linked List Cycle II
143 Reorder List
144 Binary Tree Preorder Traversal
145 Binary Tree Postorder Traversal
146 LRU Cache
147 Insertion Sort List
149 Max Points on a Line
150 Evaluate Reverse Polish Notation
151 Reverse Words in a String
152 Maximum Product Subarray
155 Min Stack
160 Intersection of Two Linked Lists
162 Find Peak Element
166 Fraction to Recurring Decimal
168 Excel Sheet Column Title
169 Majority Element
171 Excel Sheet Column Number
172 Factorial Trailing Zeroes
173 Binary Search Tree Iterator
179 Largest Number
189 Rotate Array
Table of Contents Introduction 001 Two Sum 002 Add Two Numbers 003 Longest Substring Without Repeating Characters 004 Median of Two Sorted Arrays 005 Longest Palindromic Substring 006 ZigZag Conversion 007 String to Integer (atoi) 008 Reverse Integer 009 Palindrome Number 010 Regular Expression Matching 011 Container With Most Water 012 Integer to Roman 013 Roman to Integer 014 Longest Common Prefix 015 3Sum 016 3Sum Closest 017 Letter Combinations of a Phone Number 018 4Sum 019 Remove Nth Node From End of List 020 Valid Parentheses 021 Merge Two Sorted Lists 022 Generate Parentheses 023 Merge k Sorted Lists 024 Swap Nodes in Pairs 025 Reverse Nodes in k-Group 026 Remove Duplicates from Sorted Array 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1
027 Remove Element 028 Implement strStr() 029 Divide Two Integers 030 Substring with Concatenation of All Words 031 Next Permutation 032 Longest Valid Parentheses 033 Search in Rotated Sorted Array 034 Search for a Range 035 Search Insert Position 036 Valid Sudoku 037 Sudoku Solver 038 Count and Say 039 Combination Sum 040 Combination Sum II 041 First Missing Positive 042 Trapping Rain Water 043 Multiply Strings 044 Wildcard Matching 045 Jump Game II 046 Permutations 047 Permutations II 048 Rotate Image 049 Group Anagrams 050 Pow(X, n) 051 N-Queens 052 N-Queens II 053 Maximum Subarray 054 Spiral Matrix 055 Jump Game 056 Merge Intervals 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.50 1.51 1.52 1.53 1.54 1.55 1.56 1.57 2
057 Insert Interval 058 Length of Last Word 059 Spiral Matrix II 060 Permutation Sequence 061 Rotate List 062 Unique Paths 063 Unique Paths II 064 Minimum Path Sum 065 Valid Number 066 Plus One 067 Add Binary 068 Text Justification 069 Sqrt(X) 070 Climbing Stairs 071 Simplify Path 072 Edit Distance 073 Set Matrix Zeroes 074 Search a 2D Matrix 075 Sort Colors 076 Minimum Window Substring 077 Combinations 078 Subsets 079 Word Search 080 Remove Duplicates from Sorted Array II 081 Search in Rotated Sorted Array II 082 Remove Duplicates from Sorted List II 083 Remove Duplicates from Sorted List 084 Largest Rectangle in Histogram 085 Maximal Rectangle 086 Partition List 1.58 1.59 1.60 1.61 1.62 1.63 1.64 1.65 1.66 1.67 1.68 1.69 1.70 1.71 1.72 1.73 1.74 1.75 1.76 1.77 1.78 1.79 1.80 1.81 1.82 1.83 1.84 1.85 1.86 1.87 3
087 Scramble String 088 Merge Sorted Array 089 Gray Code 090 Subsets II 091 Decode Ways 092 Reverse Linked List II 093 Restore IP Addresses 094 Binary Tree Inorder Traversal 095 Unique Binary Search Trees II 096 Unique Binary Search Trees 097 Interleaving String 098 Validate Binary Search Tree 099 Recover Binary Search Tree 100 Same Tree 101 Symmetric Tree 102 Binary Tree Level Order Traversal 103 Binary Tree Zigzag Level Order Traversal 104 Maximum Depth of Binary Tree 105 Construct Binary Tree from Preorder and Inorder Traversal 106 Construct Binary Tree from Inorder and Postorder Traversal 107 Binary Tree Level Order Traversal II 108 Convert Sorted Array to Binary Search Tree 109 Convert Sorted List to Binary Search Tree 110 Balanced Binary Tree 111 Minimum Depth of Binary Tree 112 Path Sum 113 Path Sum II 114 Flatten Binary Tree to Linked List 115 Distinct Subsequences 116 Populating Next Right Pointers in Each Node 1.88 1.89 1.90 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.98 1.99 1.100 1.101 1.102 1.103 1.104 1.105 1.106 1.107 1.108 1.109 1.110 1.111 1.112 1.113 1.114 1.115 1.116 1.117 4
117 Populating Next Right Pointers in Each Node II 118 Pascal's Triangle 119 Pascal's Triangle II 120 Triangle 121 Best Time to Buy and Sell Stock 122 Best Time to Buy and Sell Stock II 123 Best Time to Buy and Sell Stock III 124 Binary Tree Maximum Path Sum 125 Valid Palindrome 126 Word Ladder II 127 Word Ladder 128 Longest Consecutive Sequence 129 Sum Root to Leaf Numbers 130 Surrounded Regions 131 Palindrome Partitioning 132 Palindrome Partitioning II 133 Clone Graph 134 Gas Station 135 Candy 136 Single Number 137 Single Number II 138 Copy List with Random Pointer 139 Word Break 140 Word Break II 141 Linked List Cycle 142 Linked List Cycle II 143 Reorder List 144 Binary Tree Preorder Traversal 145 Binary Tree Postorder Traversal 146 LRU Cache 1.118 1.119 1.120 1.121 1.122 1.123 1.124 1.125 1.126 1.127 1.128 1.129 1.130 1.131 1.132 1.133 1.134 1.135 1.136 1.137 1.138 1.139 1.140 1.141 1.142 1.143 1.144 1.145 1.146 1.147 5
147 Insertion Sort List 148 Sort List 149 Max Points on a Line 150 Evaluate Reverse Polish Notation 151 Reverse Words in a String 152 Maximum Product Subarray 153 Find Minimum in Rotated Sorted Array 154 Find Minimum in Rotated Sorted Array II 155 Min Stack 156 Binary Tree Upside Down 157 Read N Characters Given Read4 158 Read N Characters Given Read4 II - Call multiple times 159 Longest Substring with At Most Two Distinct Characters 160 Intersection of Two Linked Lists 161 One Edit Distance 162 Find Peak Element 163 Missing Ranges 164 Maximum Gap 165 Compare Version Numbers 166 Fraction to Recurring Decimal 167 Two Sum II - Input array is sorted 168 Excel Sheet Column Title 169 Majority Element 170 Two Sum III - Data structure design 171 Excel Sheet Column Number 172 Factorial Trailing Zeroes 173 Binary Search Tree Iterator 174 Dungeon Game 175 Combine Two Tables 176 Second Highest Salary 1.148 1.149 1.150 1.151 1.152 1.153 1.154 1.155 1.156 1.157 1.158 1.159 1.160 1.161 1.162 1.163 1.164 1.165 1.166 1.167 1.168 1.169 1.170 1.171 1.172 1.173 1.174 1.175 1.176 1.177 6
177 Nth Highest Salary 178 Rank Scores 179 Largest Number 180 Consecutive Numbers 181 Employees Earning More Than Their Managers 182 Duplicate Emails 183 Customers Who Never Order 184 Department Highest Salary 185 Department Top Three Salaries 186 Reverse Words in a String II 187 Repeated DNA Sequences 188 Best Time to Buy and Sell Stock IV 189 Rotate Array 190 Reverse Bits 191 Number of 1 Bits 192 Word Frequency 193 Valid Phone Numbers 194 Transpose File 195 Tenth Line 196 Delete Duplicate Emails 197 Rising Temperature 198 House Robber 199 Binary Tree Right Side View 200 Number of Islands 1.178 1.179 1.180 1.181 1.182 1.183 1.184 1.185 1.186 1.187 1.188 1.189 1.190 1.191 1.192 1.193 1.194 1.195 1.196 1.197 1.198 1.199 1.200 1.201 7
Introduction LeetCode Python LeetCode的解题思路,代码是Python3版本。 8
分享到:
收藏