Need help with leetcode?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

yubinbai
125 Stars 72 Forks GNU General Public License v3.0 669 Commits 0 Opened issues

Description

Solutions to Leetcode Online Judge

Services available

!
?

Need anything else?

Contributors list

# 354,973
Java
C++
470 commits

Leetcode solutions in C++, Java, Python

| Number | Title | Difficulty | |--------+------------------------------------------------------------------------------------------------------------------------------------------------------+------------| | 398 | [[./src/randompickindex][Random Pick Index]] | Medium | | 397 | [[./src/integer_replacement][Integer Replacement]] | Medium | | 396 | [[./src/rotate_function][Rotate Function]] | Medium | | 395 | [[./src/longestsubstringwithatleastkrepeating_characters][Longest Substring with At Least K Repeating Characters]] | Medium | | 394 | [[./src/decode_string][Decode String]] | Medium | | 393 | [[./src/utf8validation][UTF-8 Validation]] | Medium | | 392 | [[./src/is_subsequence][Is Subsequence]] | Easy | | 391 | [[./src/perfect_rectangle][Perfect Rectangle]] | Hard | | 390 | [[./src/elimination_game][Elimination Game]] | Medium | | 389 | [[./src/findthedifference][Find the Difference]] | Easy | | 388 | [[./src/longestabsolutefile_path][Longest Absolute File Path]] | Medium | | 387 | [[./src/firstuniquecharacterina_string][First Unique Character in a String]] | Easy | | 386 | [[./src/lexicographical_numbers][Lexicographical Numbers]] | Medium | | 385 | [[./src/mini_parser][Mini parser]] | Medium | | 384 | [[./src/shuffleanarray][Shuffle An Array]] | Medium | | 383 | [[./src/ransom_note][Ransom Note]] | Easy | | 382 | [[./src/linkedlistrandom_note][Linked List Random Node]] | Medium | | 381 | [[./src/insertdeletegetrandomo1duplicate][Insert Delete GetRandom O(1) Duplicate]] | Hard | | 380 | [[./src/insertdeletegetrandom_o1][Insert Delete GetRandom O(1)]] | Medium | | 379 | [[./src/designphonedirectory][Design Phone Directory]] | Medium | | 378 | [[./src/kthsmallestsorted_matrix][Kth Smallest Element in a Sorted Matrix]] | Medium | | 377 | [[./src/combinationsumiv][Combination Sum IV]] | Medium | | 376 | [[./src/wiggle_sequence][Wiggle sequence]] | Medium | | 375 | [[./src/guessnumberhigherorlower_ii][Guess number higher or lower ii]] | Medium | | 374 | [[./src/guessnumberhigherorlower][Guess number higher or lower]] | Easy | | 373 | [[./src/findkpairswithsmallest_sums][Find K Pairs with Smallest Sums]] | Medium | | 372 | [[./src/super_pow][Super Pow]] | Medium | | 371 | [[./src/sumoftwo_integers][Sum of Two Integers]] | Easy | | 370 | [[./src/range_addition][Range Addition]] | Medium | | 369 | [[./src/plusonelinked_list][Plus One Linked List]] | Medium | | 368 | [[./src/largestdivisiblesubset][Largest divisible subset]] | Medium | | 367 | [[./src/validperfectsquare][Valid Perfect Square]] | Medium | | 366 | [[./src/findleavesofbinarytree][Find Leaves of Binary Tree]] | Medium | | 365 | [[./src/waterandjug_problem][Water and Jug Problem]] | Medium | | 364 | [[./src/nestedlistweightsumii][Nested List Weight Sum II]] | Medium | | 363 | [[./src/maxsumofrectanglenolargerthan_k][Max Sum of Rectangle No Larger Than K]] | Hard | | 362 | [[./src/designhitcounter][Design Hit Counter]] | Medium | | 361 | [[./src/bomb_enemy][Bomb Enemy]] | Medium | | 360 | [[./src/sorttransformedarray][Sort Transformed Array]] | Medium | | 359 | [[./src/loggerratelimiter][Logger Rate Limiter]] | Easy | | 358 | [[./src/rearrangestringkdistanceapart][Rearrage String K distance Apart]] | Hard | | 357 | [[./src/countnumberswithuniquedigits][Count Numbers with Unique Digits]] | Medium | | 356 | [[./src/line_reflection][Line Reflection]] | Medium | | 355 | [[./src/design_twitter][Design Twitter]] | Medium | | 354 | [[./src/russiandollenvelopes][Russian Doll Envelopes]] | Hard | | 353 | [[./src/designsnakegame][Design Snake Game]] | Medium | | 352 | [[./src/datastreamasdisjointintervals][Data Stream as Disjoint Intervals]] | Hard | | 351 | [[./src/androidunlockpatterns][Android unlock patterns]] | Medium | | 350 | [[./src/intersectionoftwoarraysii][Intersection of Two Arrays II]] | Easy | | 349 | [[./src/intersectionoftwo_arrays][Intersection of Two Arrays]] | Easy | | 348 | [[./src/designtictac_toe][Design tic-tac-toe]] | Medium | | 347 | [[./src/topkfrequent_elements][Top K frequent elements]] | Medium | | 346 | [[./src/movingaveragefromdatastream][Moving Average from data stream]] | Easy | | 345 | [[./src/reversevowelsofastring][Reverse Vowels of a String]] | Easy | | 344 | [[./src/reverse_string][Reverse String]] | Easy | | 343 | [[./src/integer_break][Integer Break]] | Medium | | 342 | [[./src/poweroffour][Power of Four]] | Easy | | 341 | [[./src/flattennestedlist_iterator][Flatten Nested List Iterator]] | Medium | | 340 | [[./src/longestsubstringwithatmostkdistinct_characters][Longest Substring with At Most K Distinct Characters]] | Hard | | 339 | [[./src/nestedlistweight_sum][Nested List Weight Sum]] | Easy | | 338 | [[./src/counting_bits][Counting Bits]] | Medium | | 337 | [[./src/houserobberiii][House Robber III]] | Medium | | 336 | [[./src/palindrome_pairs][Palindrome Pairs]] | Hard | | 335 | [[./src/self_crossing][Self Crossing]] | Hard | | 334 | [[./src/increasingtripletsubsequence][Increasing Triplet Subsequence]] | Medium | | 333 | [[./src/largestbstsubtree][Largest BST subtree]] | Medium | | 332 | [[./src/reconstruct_itinerary][Reconstruct Itinerary]] | Medium | | 331 | [[./src/verifypreorderserializationofabinarytree][Verify Preorder Serialization of a Binary Tree]] | Medium | | 330 | [[./src/patching_array][Patching Array]] | Medium | | 329 | [[./src/longestincreasingpathina_matrix][Longest Increasing Path in a Matrix]] | Hard | | 328 | [[./src/oddevenlinked_list][Odd Even Linked List]] | Easy | | 327 | [[./src/countofrange_sum][Count of Range Sum]] | Hard | | 326 | [[./src/powerofthree][Power of Three]] | Easy | | 325 | [[./src/maximumsizesubarraysumequals_k][Maximum Size Subarray Sum Equals k]] | Easy | | 324 | [[./src/wigglesortii][Wiggle Sort II]] | Medium | | 323 | [[./src/numberofconnected_components][Number of Connected Components]] | Medium | | 322 | [[./src/coin_change][Coin Change]] | Medium | | 321 | [[./src/createmaximumnumber][Create Maximum Number]] | Hard | | 320 | [[./src/generalized_abbreviation][Generalized Abbreviation]] | Medium | | 319 | [[./src/bulb_switcher][Bulb Switcher]] | Medium | | 318 | [[./src/maximumproductofwordlengths][Maximum Product of Word Lengths]] | Medium | | 317 | [[./src/shortestdistancefromallbuildings][Shortest Distance from All Buildings]] | Hard | | 316 | [[./src/removeduplicateletters][Remove Duplicate Letters]] | Medium | | 315 | [[./src/countofsmallernumberafter_self][Count of Smaller Numbers After Self]] | Hard | | 314 | [[./src/binarytreeverticalordertraversal][Binary Tree Vertical Order Traversal]] | Medium | | 313 | [[./src/superuglynumber][Super Ugly Number]] | Medium | | 312 | [[./src/burst_balloons][Burst Balloons]] | Medium | | 311 | [[./src/sparsematrixmultiplication][Sparse Matrix Multiplication]] | Medium | | 310 | [[./src/minimumheighttrees][Minimum Height Trees]] | Medium | | 309 | [[./src/besttimetobuyandsellstockwithcooldown][Best Time to Buy and Sell Stock with Cooldown]] | Medium | | 308 | [[./src/rangesumquery2dmutable][Range Sum Query 2D - Mutable]] | Hard | | 307 | [[./src/rangesumquery_mutable][Range Sum Query - Mutable]] | Medium | | 306 | [[./src/additive_number][Additive Number]] | Medium | | 305 | [[./src/numberofislands_ii][Number of Islands II]] | Hard | | 304 | [[./src/rangesumquery2dimmutable][Range Sum Query 2D - Immutable]] | Medium | | 303 | [[./src/rangesumquery_immutable][Range Sum Query - Immutable]] | Easy | | 302 | [[./src/smallestrectangleenclosingblackpixels][Smallest Rectangle Enclosing Black Pixels]] | Hard | | 301 | [[./src/removeinvalidparentheses][Remove Invalid Parentheses]] | Hard | | 300 | [[./src/longestincreasingsubsequence][Longest Increasing Subsequence]] | Medium | | 299 | [[./src/bullsandcows][Bulls and Cows]] | Easy | | 298 | [[./src/binarytreelongestconsecutivesequence][Binary Tree Longest Consecutive Sequence]] | Medium | | 297 | [[./src/serializeanddeserializebinarytree][Serialize and Deserialize Binary Tree]] | Medium | | 296 | [[./src/bestmeetingpoint][Best Meeting Point]] | Hard | | 295 | [[./src/findmedianfromdatastream][Find Median from Data Stream]] | Hard | | 294 | [[./src/flipgameii][Flip Game II]] | Medium | | 293 | [[./src/flip_game][Flip Game]] | Easy | | 292 | [[./src/nim_game][Nim Game]] | Easy | | 291 | [[./src/wordpatternii][Word Pattern II]] | Hard | | 290 | [[./src/word_pattern][Word Pattern]] | Easy | | 289 | [[./src/gameoflife][Game of Life]] | Medium | | 288 | [[./src/uniquewordabbreviation][Unique Word Abbreviation]] | Easy | | 287 | [[./src/findtheduplicate_number][Find the Duplicate Number]] | Hard | | 286 | [[./src/wallsandgates][Walls and Gates]] | Medium | | 285 | [[./src/inordersuccessorin_bst][Inorder Successor in BST]] | Medium | | 284 | [[./src/peeking_iterator][Peeking Iterator]] | Medium | | 283 | [[./src/moving_zeroes][Moving Zeroes]] | Easy | | 282 | [[./src/expressionaddoperators][Expression Add Operators]] | Hard | | 281 | [[./src/zigzag_iterator][Zigzag Iterator]] | Medium | | 280 | [[./src/wiggle_sort][Wiggle Sort]] | Medium | | 279 | [[./src/perfect_squares][Perfect Squares]] | Medium | | 278 | [[./src/firstbadversion][First Bad Version]] | Easy | | 277 | [[./src/findthecelebrity][Find the Celebrity]] | Medium | | 276 | [[./src/paint_fence][Paint Fence]] | Easy | | 275 | [[./src/hindexii][H Index II]] | Medium | | 274 | [[./src/h_index][H Index]] | Medium | | 273 | [[./src/integertoenglish_words][Integer to English Words]] | Medium | | 272 | [[./src/closestbinarysearchtreevalue_ii][Closest Binary Search Tree Value II]] | Hard | | 271 | [[./src/encodeanddecode_strings][Encode and Decode Strings]] | Medium | | 270 | [[./src/closestbinarysearchtreevalue][Closest Binary Search Tree Value]] | Easy | | 269 | [[./src/alien_dictionary][Alien Dictionary]] | Hard | | 268 | [[./src/missing_number][Missing Number]] | Medium | | 267 | [[./src/palindromepermutationii][Palindrome Permutation II]] | Medium | | 266 | [[./src/palindrome_permutation][Palindrome Permutation]] | Easy | | 265 | [[./src/painthouseii][Paint House II]] | Hard | | 264 | [[./src/uglynumberii][Ugly Number II]] | Medium | | 263 | [[./src/ugly_number][Ugly Number]] | Easy | | 261 | [[./src/graphvalidtree][Graph Valid Tree]] | Medium | | 260 | [[./src/singlenumberiii][Single Number III]] | Medium | | 259 | [[./src/3sum_smaller][3Sum Smaller]] | Medium | | 258 | [[./src/add_digits][Add Digits]] | Easy | | 257 | [[./src/binarytreepaths][Binary Tree Paths]] | Easy | | 256 | [[./src/paint_house][Paint House]] | Medium | | 255 | [[./src/verifypreordersequenceinbinarysearchtree][Verify Preorder Sequence in Binary Search Tree]] | Medium | | 254 | [[./src/factor_combinations][Factor Combinations]] | Medium | | 253 | [[./src/meetingroomsii][Meeting Rooms II]] | Medium | | 252 | [[./src/meeting_rooms][Meeting Rooms]] | Easy | | 251 | [[./src/flatten2dvector][Flatten 2D Vector]] | Medium | | 250 | [[./src/countunivaluesubtrees][Count Univalue Subtrees]] | Medium | | 249 | [[./src/groupshiftedstrings][Group Shifted Strings]] | Easy | | 248 | [[./src/strobogrammaticnumberiii][Strobogrammatic Number III]] | Hard | | 247 | [[./src/strobogrammaticnumberii][Strobogrammatic Number II]] | Medium | | 246 | [[./src/strobogrammatic_number][Strobogrammatic Number]] | Easy | | 245 | [[./src/shortestworddistance_iii][Shortest Word Distance III]] | Medium | | 244 | [[./src/shortestworddistance_ii][Shortest Word Distance II]] | Medium | | 243 | [[./src/shortestworddistance][Shortest Word Distance]] | Easy | | 242 | [[https://leetcode.com/problems/valid-anagram/][Valid Anagram]] | Easy | | 241 | [[https://leetcode.com/problems/different-ways-to-add-parentheses/][Different Ways to Add Parentheses]] | Medium | | 240 | [[https://leetcode.com/problems/search-a-2d-matrix-ii/][Search a 2D Matrix II]] | Medium | | 239 | [[https://leetcode.com/problems/sliding-window-maximum/][Sliding Window Maximum]] | Hard | | 238 | [[https://leetcode.com/problems/product-of-array-except-self/][Product of Array Except Self]] | Medium | | 237 | [[https://leetcode.com/problems/delete-node-in-a-linked-list/][Delete Node in a Linked List]] | Easy | | 236 | [[https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/][Lowest Common Ancestor of a Binary Tree]] | Medium | | 235 | [[https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/][Lowest Common Ancestor of a Binary Search Tree]] | Easy | | 234 | [[https://leetcode.com/problems/palindrome-linked-list/][Palindrome Linked List]] | Easy | | 233 | [[https://leetcode.com/problems/number-of-digit-one/][Number of Digit One]] | Medium | | 232 | [[https://leetcode.com/problems/implement-queue-using-stacks/][Implement Queue using Stacks]] | Easy | | 231 | [[https://leetcode.com/problems/power-of-two/][Power of Two]] | Easy | | 230 | [[https://leetcode.com/problems/kth-smallest-element-in-a-bst/][Kth Smallest Element in a BST]] | Medium | | 229 | [[https://leetcode.com/problems/majority-element-ii/][Majority Element II]] | Medium | | 228 | [[https://leetcode.com/problems/summary-ranges/][Summary Ranges]] | Easy | | 227 | [[https://leetcode.com/problems/basic-calculator-ii/][Basic Calculator II]] | Medium | | 226 | [[https://leetcode.com/problems/invert-binary-tree/][Invert Binary Tree]] | Easy | | 225 | [[https://leetcode.com/problems/implement-stack-using-queues/][Implement Stack using Queues]] | Medium | | 224 | [[https://leetcode.com/problems/basic-calculator/][Basic Calculator]] | Medium | | 223 | [[https://leetcode.com/problems/rectangle-area/][Rectangle Area]] | Easy | | 222 | [[https://leetcode.com/problems/count-complete-tree-nodes/][Count Complete Tree Nodes]] | Medium | | 221 | [[https://leetcode.com/problems/maximal-square/][Maximal Square]] | Medium | | 220 | [[https://leetcode.com/problems/contains-duplicate-iii/][Contains duplicate iii]] | Medium | | 219 | [[https://leetcode.com/problems/contains-duplicate-ii/][Contains duplicate ii]] | Easy | | 218 | [[https://leetcode.com/problems/the-skyline-problem/][The Skyline Problem]] | Hard | | 217 | [[https://leetcode.com/problems/contains-duplicate/][Contains duplicate]] | Easy | | 216 | [[https://leetcode.com/problems/combination-sum-iii/][Combination Sum III]] | Medium | | 215 | [[https://leetcode.com/problems/kth-largest-element-in-an-array/][Kth Largest Element in an Array]] | Medium | | 214 | [[https://leetcode.com/problems/shortest-palindrome/][Shortest Palindrome]] | Hard | | 213 | [[https://leetcode.com/problems/house-robber-ii/][House robber II]] | Medium | | 212 | [[https://leetcode.com/problems/word-search-ii/][Word search II]] | Hard | | 211 | [[https://leetcode.com/problems/add-and-search-word-data-structure-design/][Add and Search Word]] | Medium | | 210 | [[https://leetcode.com/problems/course-schedule-ii/][Course schedule II]] | Medium | | 209 | [[https://leetcode.com/problems/minimum-size-subarray-sum/][Minimum Size Subarray Sum]] | Medium | | 208 | [[https://leetcode.com/problems/implement-trie-prefix-tree/][Implement Trie]] | Medium | | 207 | [[https://leetcode.com/problems/course-schedule/][Course schedule]] | Medium | | 205 | [[https://leetcode.com/problems/reverse-linked-list/][Revese linkedlist]] | Easy | | 205 | [[https://leetcode.com/problems/isomorphic-strings/][Isomorphic Strings]] | Easy | | 204 | [[https://leetcode.com/problems/count-primes/][Count primes]] | Medium | | 203 | [[https://leetcode.com/problems/remove-linked-list-elements/][Remove Linked List Elements]] | Easy | | 202 | [[https://leetcode.com/problems/happy-number/][Happy Number]] | Easy | | 201 | [[https://leetcode.com/problems/bitwise-and-of-numbers-range/][Bitwise AND of Numbers Range]] | Medium | | 200 | [[https://leetcode.com/problems/number-of-islands/][Number of islands]] | Medium | | 199 | [[https://leetcode.com/problems/binary-tree-right-side-view/][Binary tree right side view]] | Medium | | 198 | [[https://leetcode.com/problems/house-robber/][House robber]] | Easy | | 191 | [[https://leetcode.com/problems/number-of-1-bits/][Number of 1 bits]] | Easy | | 190 | [[https://oj.leetcode.com/problems/reverse-bits/][Reverse bits]] | Easy | | 189 | [[https://oj.leetcode.com/problems/rotate-array/][Rotate array]] | Easy | | 188 | [[https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/][Best Time to Buy and Sell Stock IV]] | Hard | | 187 | [[https://oj.leetcode.com/problems/repeated-dna-sequences/][Repeated DNA Sequences]] | Medium | | 176 | [[https://oj.leetcode.com/problems/reverse-words-in-a-string-ii/][Reverse Words in a String II]] | Medium | | 179 | [[https://oj.leetcode.com/problems/largest-number/][Largest Number]] | Medium | | 174 | [[https://oj.leetcode.com/problems/dungeon-game/][Dungeon Game]] | Hard | | 173 | [[https://oj.leetcode.com/problems/binary-search-tree-iterator/][Binary Search Tree Iterator]] | Medium | | 172 | [[https://oj.leetcode.com/problems/factorial-trailing-zeroes/][Factorial Trailing Zeroes]] | Easy | | 171 | [[https://oj.leetcode.com/problems/excel-sheet-column-number/][Excel Sheet Column Number]] | Easy | | 169 | [[https://oj.leetcode.com/problems/majority-element/][Majority Element]] | Easy | | 168 | [[https://oj.leetcode.com/problems/excel-sheet-column-title/][Excel Sheet Column Title]] | Easy | | 166 | [[https://oj.leetcode.com/problems/fraction-to-recurring-decimal/][Fraction to Recurring Decimal]] | Medium | | 165 | [[https://oj.leetcode.com/problems/compare-version-numbers/][Compare Version Numbers]] | Easy | | 164 | [[https://oj.leetcode.com/problems/maximum-gap/][Maximum Gap]] | Hard | | 163 | [[https://oj.leetcode.com/problems/missing-ranges/][Missing Ranges]] | Medium | | 162 | [[https://oj.leetcode.com/problems/find-peak-element/][Find Peak Element]] | Medium | | 161 | [[https://oj.leetcode.com/problems/one-edit-distance/][One Edit Distance]] | Medium | | 160 | [[https://oj.leetcode.com/problems/intersection-of-two-linked-lists/][Intersection of Two Linked Lists]] | Easy | | 159 | [[https://oj.leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/][Longest Substring with At Most Two Distinct Characters]] | Hard | | 158 | [[https://oj.leetcode.com/problems/read-n-characters-given-read4-ii-call-multiple-times/][Read N Characters Given Read4 II - Call multiple times]] | Hard | | 157 | [[https://oj.leetcode.com/problems/read-n-characters-given-read4/][Read N Characters Given Read4]] | Easy | | 156 | [[https://oj.leetcode.com/problems/binary-tree-upside-down/][Binary Tree Upside Down]] | Medium | | 155 | [[https://oj.leetcode.com/problems/min-stack/][Min Stack]] | Easy | | 154 | [[https://oj.leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/][Find Minimum in Rotated Sorted Array II]] | Hard | | 153 | [[https://oj.leetcode.com/problems/find-minimum-in-rotated-sorted-array/][Find Minimum in Rotated Sorted Array]] | Medium | | 152 | [[https://oj.leetcode.com/problems/maximum-product-subarray/][Maximum Product Subarray]] | Medium | | 151 | [[https://oj.leetcode.com/problems/reverse-words-in-a-string/][Reverse Words in a String]] | Medium | | 150 | [[https://oj.leetcode.com/problems/evaluate-reverse-polish-notation/][Evaluate Reverse Polish Notation]] | Medium | | 149 | [[https://oj.leetcode.com/problems/max-points-on-a-line/][Max Points on a Line]] | Hard | | 148 | [[https://oj.leetcode.com/problems/sort-list/][Sort List]] | Medium | | 147 | [[https://oj.leetcode.com/problems/insertion-sort-list/][Insertion Sort List]] | Medium | | 146 | [[https://oj.leetcode.com/problems/lru-cache/][LRU Cache]] | Hard | | 145 | [[https://oj.leetcode.com/problems/binary-tree-postorder-traversal/][Binary Tree Postorder Traversal]] | Hard | | 144 | [[https://oj.leetcode.com/problems/binary-tree-preorder-traversal/][Binary Tree Preorder Traversal]] | Medium | | 143 | [[https://oj.leetcode.com/problems/reorder-list/][Reorder List]] | Medium | | 142 | [[https://oj.leetcode.com/problems/linked-list-cycle-ii/][Linked List Cycle II]] | Medium | | 141 | [[https://oj.leetcode.com/problems/linked-list-cycle/][Linked List Cycle]] | Medium | | 140 | [[https://oj.leetcode.com/problems/word-break-ii/][Word Break II]] | Hard | | 139 | [[https://oj.leetcode.com/problems/word-break/][Word Break]] | Medium | | 138 | [[https://oj.leetcode.com/problems/copy-list-with-random-pointer/][Copy List with Random Pointer]] | Hard | | 137 | [[https://oj.leetcode.com/problems/single-number-ii/][Single Number II]] | Medium | | 136 | [[https://oj.leetcode.com/problems/single-number/][Single Number]] | Medium | | 135 | [[https://oj.leetcode.com/problems/candy/][Candy]] | Hard | | 134 | [[https://oj.leetcode.com/problems/gas-station/][Gas Station]] | Medium | | 133 | [[https://oj.leetcode.com/problems/clone-graph/][Clone Graph]] | Medium | | 132 | [[https://oj.leetcode.com/problems/palindrome-partitioning-ii/][Palindrome Partitioning II]] | Hard | | 131 | [[https://oj.leetcode.com/problems/palindrome-partitioning/][Palindrome Partitioning]] | Medium | | 130 | [[https://oj.leetcode.com/problems/surrounded-regions/][Surrounded Regions]] | Medium | | 129 | [[https://oj.leetcode.com/problems/sum-root-to-leaf-numbers/][Sum Root to Leaf Numbers]] | Medium | | 128 | [[https://oj.leetcode.com/problems/longest-consecutive-sequence/][Longest Consecutive Sequence]] | Hard | | 127 | [[https://oj.leetcode.com/problems/word-ladder-ii/][Word Ladder II]] | Hard | | 126 | [[https://oj.leetcode.com/problems/word-ladder/][Word Ladder]] | Medium | | 125 | [[https://oj.leetcode.com/problems/valid-palindrome/][Valid Palindrome]] | Easy | | 124 | [[https://oj.leetcode.com/problems/binary-tree-maximum-path-sum/][Binary Tree Maximum Path Sum]] | Hard | | 123 | [[https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/][Best Time to Buy and Sell Stock III]] | Hard | | 122 | [[https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/][Best Time to Buy and Sell Stock II]] | Medium | | 121 | [[https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock/][Best Time to Buy and Sell Stock]] | Medium | | 120 | [[https://oj.leetcode.com/problems/triangle/][Triangle]] | Medium | | 119 | [[https://oj.leetcode.com/problems/pascals-triangle-ii/][Pascal's Triangle II]] | Easy | | 118 | [[https://oj.leetcode.com/problems/pascals-triangle/][Pascal's Triangle]] | Easy | | 117 | [[https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/][Populating Next Right Pointers in Each Node II]] | Hard | | 116 | [[https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node/][Populating Next Right Pointers in Each Node]] | Medium | | 115 | [[https://oj.leetcode.com/problems/distinct-subsequences/][Distinct Subsequences]] | Hard | | 114 | [[https://oj.leetcode.com/problems/flatten-binary-tree-to-ed-list/][Flatten Binary Tree to Linked List]] | Medium | | 113 | [[https://oj.leetcode.com/problems/path-sum-ii/][Path Sum II]] | Medium | | 112 | [[https://oj.leetcode.com/problems/path-sum/][Path Sum]] | Easy | | 111 | [[https://oj.leetcode.com/problems/minimum-depth-of-binary-tree/][Minimum Depth of Binary Tree]] | Easy | | 110 | [[https://oj.leetcode.com/problems/balanced-binary-tree/][Balanced Binary Tree]] | Easy | | 109 | [[https://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/][Convert Sorted List to Binary Search Tree]] | Medium | | 108 | [[https://oj.leetcode.com/problems/convert-sorted-array-to-binary-search-tree/][Convert Sorted Array to Binary Search Tree]] | Medium | | 107 | [[https://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/][Binary Tree Level Order Traversal II]] | Easy | | 106 | [[https://oj.leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/][Construct Binary Tree from Inorder and Postorder]] | Medium | | 105 | [[https://oj.leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/][Construct Binary Tree from Preorder and Inorder]] | Medium | | 104 | [[https://oj.leetcode.com/problems/maximum-depth-of-binary-tree/][Maximum Depth of Binary Tree]] | Easy | | 103 | [[https://oj.leetcode.com/problems/binary-tree-zigzag-level-order-traversal/][Binary Tree Zigzag Level Order Traversal]] | Medium | | 102 | [[https://oj.leetcode.com/problems/binary-tree-level-order-traversal/][Binary Tree Level Order Traversal]] | Easy | | 101 | [[https://oj.leetcode.com/problems/symmetric-tree/][Symmetric Tree]] | Easy | | 100 | [[https://oj.leetcode.com/problems/same-tree/][Same Tree]] | Easy | | 99 | [[https://oj.leetcode.com/problems/recover-binary-search-tree/][Recover Binary Search Tree]] | Hard | | 98 | [[https://oj.leetcode.com/problems/validate-binary-search-tree/][Validate Binary Search Tree]] | Medium | | 97 | [[https://oj.leetcode.com/problems/interleaving-string/][Interleaving String]] | Hard | | 96 | [[https://oj.leetcode.com/problems/unique-binary-search-trees-ii/][Unique Binary Search Trees II]] | Medium | | 95 | [[https://oj.leetcode.com/problems/unique-binary-search-trees/][Unique Binary Search Trees]] | Medium | | 94 | [[https://oj.leetcode.com/problems/binary-tree-inorder-traversal/][Binary Tree Inorder Traversal]] | Medium | | 93 | [[https://oj.leetcode.com/problems/restore-ip-addresses/][Restore IP Addresses]] | Medium | | 92 | [[https://oj.leetcode.com/problems/reverse-ed-list-ii/][Reverse linked List II]] | Medium | | 91 | [[https://oj.leetcode.com/problems/subsets-ii/][Subsets II]] | Medium | | 90 | [[https://oj.leetcode.com/problems/decode-ways/][Decode Ways]] | Medium | | 89 | [[https://oj.leetcode.com/problems/gray-code/][Gray Code]] | Medium | | 88 | [[https://oj.leetcode.com/problems/merge-sorted-array/][Merge Sorted Array]] | Easy | | 87 | [[https://oj.leetcode.com/problems/scramble-string/][Scramble String]] | Hard | | 86 | [[https://oj.leetcode.com/problems/partition-list/][Partition List]] | Medium | | 85 | [[https://oj.leetcode.com/problems/maximal-rectangle/][Maximal Rectangle]] | Hard | | 84 | [[https://oj.leetcode.com/problems/largest-rectangle-in-histogram/][Largest Rectangle in Histogram]] | Hard | | 83 | [[https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list-ii/][Remove Duplicates from Sorted List II]] | Medium | | 82 | [[https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list/][Remove Duplicates from Sorted List]] | Easy | | 81 | [[https://oj.leetcode.com/problems/search-in-rotated-sorted-array-ii/][Search in Rotated Sorted Array II]] | Medium | | 80 | [[https://oj.leetcode.com/problems/remove-duplicates-from-sorted-array-ii/][Remove Duplicates from Sorted Array II]] | Medium | | 79 | [[https://oj.leetcode.com/problems/word-search/][Word Search]] | Medium | | 78 | [[https://oj.leetcode.com/problems/subsets/][Subsets]] | Medium | | 77 | [[https://oj.leetcode.com/problems/combinations/][Combinations]] | Medium | | 76 | [[https://oj.leetcode.com/problems/minimum-window-substring/][Minimum Window Substring]] | Hard | | 75 | [[https://oj.leetcode.com/problems/sort-colors/][Sort Colors]] | Medium | | 74 | [[https://oj.leetcode.com/problems/search-a-2d-matrix/][Search a 2D Matrix]] | Medium | | 73 | [[https://oj.leetcode.com/problems/set-matrix-zeroes/][Set Matrix Zeroes]] | Medium | | 72 | [[https://oj.leetcode.com/problems/edit-distance/][Edit Distance]] | Hard | | 71 | [[https://oj.leetcode.com/problems/simplify-path/][Simplify Path]] | Medium | | 70 | [[https://oj.leetcode.com/problems/climbing-stairs/][Climbing Stairs]] | Easy | | 69 | [[https://oj.leetcode.com/problems/sqrtx/][Sqrt(x)]] | Medium | | 68 | [[https://oj.leetcode.com/problems/text-justification/][Text Justification]] | Hard | | 67 | [[https://oj.leetcode.com/problems/plus-one/][Plus One]] | Easy | | 66 | [[https://oj.leetcode.com/problems/valid-number/][Valid Number]] | Easy | | 65 | [[https://oj.leetcode.com/problems/add-binary/][Add Binary]] | Easy | | 64 | [[https://oj.leetcode.com/problems/merge-two-sorted-lists/][Merge Two Sorted Lists]] | Easy | | 63 | [[https://oj.leetcode.com/problems/minimum-path-sum/][Minimum Path Sum]] | Medium | | 62 | [[https://oj.leetcode.com/problems/unique-paths-ii/][Unique Paths II]] | Medium | | 61 | [[https://oj.leetcode.com/problems/unique-paths/][Unique Paths]] | Medium | | 60 | [[https://oj.leetcode.com/problems/rotate-list/][Rotate List]] | Medium | | 59 | [[https://oj.leetcode.com/problems/permutation-sequence/][Permutation Sequence]] | Medium | | 58 | [[https://oj.leetcode.com/problems/spiral-matrix-ii/][Spiral Matrix II]] | Medium | | 57 | [[https://oj.leetcode.com/problems/length-of-last-word/][Length of Last Word]] | Easy | | 56 | [[https://oj.leetcode.com/problems/insert-interval/][Insert Interval]] | Hard | | 55 | [[https://oj.leetcode.com/problems/merge-intervals/][Merge Intervals]] | Hard | | 54 | [[https://oj.leetcode.com/problems/jump-game/][Jump Game]] | Medium | | 53 | [[https://oj.leetcode.com/problems/spiral-matrix/][Spiral Matrix]] | Medium | | 52 | [[https://oj.leetcode.com/problems/maximum-subarray/][Maximum Subarray]] | Medium | | 51 | [[https://oj.leetcode.com/problems/n-queens-ii/][N-Queens II]] | Hard | | 50 | [[https://oj.leetcode.com/problems/n-queens/][N-Queens]] | Hard | | 49 | [[https://oj.leetcode.com/problems/powx-n/]["Pow(x, n)"]] | Medium | | 48 | [[https://oj.leetcode.com/problems/anagrams/][Anagrams]] | Medium | | 47 | [[https://oj.leetcode.com/problems/rotate-image/][Rotate Image]] | Medium | | 46 | [[https://oj.leetcode.com/problems/permutations-ii/][Permutations II]] | Hard | | 45 | [[https://oj.leetcode.com/problems/permutations/][Permutations]] | Medium | | 44 | [[https://oj.leetcode.com/problems/jump-game-ii/][Jump Game II]] | Hard | | 43 | [[https://oj.leetcode.com/problems/wildcard-matching/][Wildcard Matching]] | Hard | | 41 | [[https://oj.leetcode.com/problems/trapping-rain-water/][Trapping Rain Water]] | Hard | | 40 | [[https://oj.leetcode.com/problems/first-missing-positive/][First Missing Positive]] | Hard | | 39 | [[https://oj.leetcode.com/problems/combination-sum-ii/][Combination Sum II]] | Medium | | 38 | [[https://oj.leetcode.com/problems/combination-sum/][Combination Sum]] | Medium | | 37 | [[https://oj.leetcode.com/problems/count-and-say/][Count and Say]] | Easy | | 36 | [[https://oj.leetcode.com/problems/sudoku-solver/][Sudoku Solver]] | Hard | | 35 | [[https://oj.leetcode.com/problems/valid-sudoku/][Valid Sudoku]] | Easy | | 34 | [[https://oj.leetcode.com/problems/search-insert-position/][Search Insert Position]] | Medium | | 33 | [[https://oj.leetcode.com/problems/search-for-a-range/][Search for a Range]] | Medium | | 31 | [[https://oj.leetcode.com/problems/longest-valid-parentheses/][Longest Valid Parentheses]] | Hard | | 32 | [[https://oj.leetcode.com/problems/search-in-rotated-sorted-array/][Search in Rotated Sorted Array]] | Hard | | 30 | [[https://oj.leetcode.com/problems/next-permutation/][Next Permutation]] | Medium | | 29 | [[https://oj.leetcode.com/problems/substring-with-concatenation-of-all-words/][Substring with Concatenation of All Words]] | Hard | | 28 | [[https://oj.leetcode.com/problems/divide-two-integers/][Divide Two Integers]] | Medium | | 27 | [[https://oj.leetcode.com/problems/implement-strstr/][Implement strStr()]] | Easy | | 26 | [[https://oj.leetcode.com/problems/remove-element/][Remove Element]] | Easy | | 25 | [[https://oj.leetcode.com/problems/remove-duplicates-from-sorted-array/][Remove Duplicates from Sorted Array]] | Easy | | 24 | [[https://oj.leetcode.com/problems/reverse-nodes-in-k-group/][Reverse Nodes in k-Group]] | Hard | | 23 | [[https://oj.leetcode.com/problems/swap-nodes-in-pairs/][Swap Nodes in Pairs]] | Medium | | 22 | [[https://oj.leetcode.com/problems/merge-k-sorted-lists/][Merge k Sorted Lists]] | Hard | | 21 | [[https://oj.leetcode.com/problems/generate-parentheses/][Generate Parentheses]] | Medium | | 20 | [[https://oj.leetcode.com/problems/valid-parentheses/][Valid Parentheses]] | Easy | | 19 | [[https://oj.leetcode.com/problems/remove-nth-node-from-end-of-list/][Remove Nth Node From End of List]] | Easy | | 18 | [[https://oj.leetcode.com/problems/letter-combinations-of-a-phone-number/][Letter Combinations of a Phone Number]] | Medium | | 17 | [[https://oj.leetcode.com/problems/4sum/][4Sum]] | Medium | | 16 | [[https://oj.leetcode.com/problems/3sum-closest/][3Sum Closest]] | Medium | | 15 | [[https://oj.leetcode.com/problems/3sum/][3Sum]] | Medium | | 14 | [[https://oj.leetcode.com/problems/longest-common-prefix/][Longest Common Prefix]] | Easy | | 13 | [[https://oj.leetcode.com/problems/roman-to-integer/][Roman to Integer]] | Easy | | 12 | [[https://oj.leetcode.com/problems/integer-to-roman/][Integer to Roman]] | Medium | | 11 | [[https://oj.leetcode.com/problems/container-with-most-water/][Container With Most Water]] | Medium | | 10 | [[https://oj.leetcode.com/problems/regular-expression-matching/][Regular Expression Matching]] | Hard | | 9 | [[https://oj.leetcode.com/problems/palindrome-number/][Palindrome Number]] | Easy | | 8 | [[https://oj.leetcode.com/problems/string-to-integer-atoi/][String to Integer (atoi)]] | Easy | | 7 | [[https://oj.leetcode.com/problems/reverse-integer/][Reverse Integer]] | Easy | | 6 | [[https://oj.leetcode.com/problems/zigzag-conversion/][ZigZag Conversion]] | Easy | | 5 | [[https://oj.leetcode.com/problems/longest-palindromic-substring/][Longest Palindromic Substring]] | Medium | | 4 | [[https://oj.leetcode.com/problems/median-of-two-sorted-arrays/][Median of Two Sorted Arrays]] | Hard | | 3 | [[https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/][Longest Substring Without Repeating Characters]] | Medium | | 2 | [[https://oj.leetcode.com/problems/add-two-numbers/][Add Two Numbers]] | Medium | | 1 | [[https://oj.leetcode.com/problems/two-sum/][Two Sum]] | Medium |

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.