- Leetcode Python 题解
- 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 Reverse Integer
- 008 string to integer (atoi)
- 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
- 026 Remove Duplicates from Sorted Array
- 027 Remove Element
- 028 implement strstr()
- 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
- 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 python
- 050 pow(x, n)
- 051 n-queens
- 052 n-queens ii
- 053 maximum subarray
- 054 spiral matrix
- 055 jump game
- 056 Merge Intervals
- 058 length of last word
- 059 spiral matrix ii
- 060 permutation sequence
- 061 rotate list
- 062 unique paths
- 064 minimum path sum
- 065 unique paths ii
- 066 plus one
- 067 add binary
- 069 sqrt(x)
- 070 Climbing Stairs
- 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
- 082 remove duplicates from sorted list ii
- 083 remove duplicates from sorted list
- 086 partition list
- 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
- 096 unique binary search trees
- 098 validate 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
- 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
- 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
- 133 clone graph
- 136 single number
- 139 word break
- 140 word break ii
- 141 linked list cycle
- 142_Linked_List_Cycle_II md
- 143 reorder list
- 144 binary tree preorder traversal
- 145 binary tree postorder traversal
- 147 insertion sort list
- 148 sort list
- 150 evaluate reverse polish notation
- 151 reverse words in a string
- 152 maximum product subarray
- 153 find minimum in rotated sorted array
- 155 min stack
- 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
- 162 find peak element
- 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
- 171 excel sheet column number
- 173 binary search tree iterator
- 179 Largest Number
- 182 duplicate emails
- 189 rotate array
- 191 number of 1 bits
- 198 house robber
- 199 binary tree right side view
- 200 number of islands
- 203 remove linked list elements
- 204 count primes
- 205 isomorphic strings
- 206 reverse linked list
- 207 course schedule
- 208 implement trie (prefix tree)
- 210 course schedule ii
- 211 Add and Search Word - Data structure design
- 213 house robber ii
- 216 combination sum iii
- 217 contains duplicate
- 218 The Skyline Problem
- 219 contains duplicate ii
- 221 maximal square
- 222 count complete tree nodes
- 223 rectangle area
- 224 Basic Calculator
- 225 implement stack using queues
- 226 invert binary tree
- 227 basic calculator ii
- 228 summary ranges
- 229 majority element ii
- 230 kth smallest element in a bst
- 231 Power of Two
- 232 implement queue using stacks
- 234 palindrome linked list
- 235 lowest common ancestor of a binary search tree
- 236 lowest common ancestor of a binary tree
- 237 delete node in a linked list
- 238 product of array except self
- 240 search a 2d matrix ii
- 242 valid anagram
- 249 Group Shifted Strings
- 252 Meeting Rooms
- 255 Verify Preorder Sequence in Binary Search Tree
- 256 Paint House
- 257 binary tree paths
- 258_ Add_Digits md
- 261 Graph Valid Tree
- 263 ugly number
- 264 ugly number ii
- 265 Paint House II
- 266 Palindrome Permutation
- 267 Palindrome Permutation II
- 268 missing number
- 270 Closest Binary Search Tree Value
- 276 Paint Fence
- 277 Find the Celebrity
- 278 First Bad Version
- 279 perfect squares
- 280 Wiggle Sort
- 283 move zeroes
- 285 inorder successor in bst
- 286 Walls and Gates
- 287 Find the Duplicate Number
- 289 game of life
- 290 word pattern
- 292 nim game
- 293 Flip Game
- 296 Best Meeting Point
- 298 Binary Tree Longest Consecutive Sequence
- 299 bulls and cows
- 300 longest increasing subsequence
- 303 range sum query - immutable
- 316 Remove Duplicate Letters
- 319 Bulb Switcher
- 322 Coin Change
- 323 number of connected components in an undirected graph
- 324 Wiggle Sort II
- 326 power of three
- 328 odd even linked list
- 334 increasing triplet subsequence
- 337 house robber iii
- 338 Counting Bits
- 339 Nested List Weight Sum
- 341 Flatten Nested List Iterator
- 342 Power of Four
- 344 reverse string
- 345 Reverse Vowels of a String
- 349 intersection of two arrays
- 350 intersection of two arrays ii
- 353 Design Snake Game
- 361 Bomb Enemy
- 364 Nested List Weight Sum II
- 366 Find Leaves of Binary Tree
- 367 valid perfect square
- 369 Plus One Linked List
- 371 sum of two integers
- 374 Guess Number Higher or Lower
- 377 combination sum iv
- 378 kth smallest element in a sorted matrix
- 380 Insert Delete GetRandom O(1)
- 381 Insert Delete GetRandom O(1) - Duplicates allowed
- 382 linked list random node
- 383 ransom note
- 384 Shuffle an Array
- 386 Lexicographical Numbers
- 387 first unique character in a string
- 388 Longest Absolute File Path
- 389 find the difference
- 392 is subsequence
- 394 decode string
- 400 Nth Digit
- 401 binary watch
- 404 sum of left leaves
- 405 Convert a Number to Hexadecimal
- 406 Queue Reconstruction by Height
- 412 fizz buzz
- 413 Arithmetic Slices
- 414 third maximum number
- 415 add strings
- 416 Partition Equal Subset Sum
- 421 Maximum XOR of Two Numbers in an Array
- 422 Valid Word Square
- 434 number of segments in a string
- 435 Non-overlapping Intervals
- 437 path sum iii
- 438 Find All Anagrams in a String
- 439 Ternary Expression Parser
- 441 arranging coins
- 448 Find All Numbers Disappeared in an Array
- 450 Delete Node in a BST
- 453 Minimum Moves to Equal Array Elements
- 459 Repeated Substring Pattern
- 461 Hamming Distance
- 463 Island Perimeter
- 467 Unique Substrings in Wraparound String
- 469 Convex Polygon
- 476 Number Complement
- 477 Total Hamming Distance
- 485 Max Consecutive Ones
- 494 Target Sum
- 536 Construct Binary Tree from String
- 587 Erect the Fence
- 599 Minimum Index Sum of Two Lists
- 606 Construct String from Binary Tree
- 611 Valid Triangle Number
- 646 Maximum Length of Pair Chain
- 647 Palindromic Substrings
- 657 Judge Route Circle
- 665 Non-decreasing Array
- 672 Bulb Switcher II
- 681 Next Closest Time
- 682 Baseball Game
- 685 Redundant Connection II
- 687 Longest Univalue Path
- 693 Binary Number with Alternating Bits
- 701 Insert into a Binary Search Tree
- 707 Design Linked List
- 740 delete and earn
- 760 Find Anagram Mappings
- 774 Minimize Max Distance to Gas Station
- 777 Swap Adjacent in LR String
- 844 Backspace String Compare