Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mirinta/leet_code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1,996 Commits

Repository files navigation

LeetCode

Contests

  • Biweekly 107 (2744~2747)
  • Weekly 351 (2748~2751)
  • Weekly 352 (2760~2763)
  • Biweekly 108 (2765~2768)
  • Weekly 365 (2873~2876)
  • Weekly 366 (2894~2897): 2897 is NOT DONE!
  • Biweekly 115 (2899~2902): 2902 is NOT DONE!
  • Weekly 367 (2903~2906)
  • Weekly 368 (2908~2911)
  • Biweekly 116 (2913~2916)
  • Weekly 369 (2917~2920)
  • Weekly 370 (2923~2926)
  • Biweekly 117 (2928~2931)
  • Weekly 371 (2932~2935)
  • Weekly 372 (2937~2940)
  • Biweekly 118 (2942~2945)
  • Weekly 373 (2946~2950)
  • Weekly 374 (2951~2954)
  • Biweekly 119 (2956~2959)
  • Weekly 375 (2960~2963)
  • Weekly 376 (2965~2968)
  • Biweekly 120 (2970~2973)
  • Weekly 377 (2974~2977)
  • Weekly 378 (2980~2983): 2983 is GREAT!
  • Biweekly 121 (2996~2999)
  • Weekly 379 (3000~3003)
  • Weekly 380 (3005~3008): 3007 is GREAT!
  • Biweekly 122 (3010~3013)
  • Weekly 381 (3014~3017): 3017 is NOT DONE!
  • Weekly 382 (3019~3022)
  • Biweekly 123 (3024~3027)
  • Weekly 383 (3028~3031)
  • Weekly 384 (3033~3037)
  • Biweekly 124 (3038~3041)
  • Weekly 385 (3042~3045)
  • Weekly 386 (3046~3049): 3049 is NOT DONE!
  • Biweekly 125 (3066~3068)
  • Weekly 387 (3070~3072)
  • Weekly 388 (3074~3077)
  • Biweekly 126 (3079~3082)
  • Weekly 389 (3083~3086)
  • Weekly 390 (3090~3093)
  • Biweekly 127 (3095~3098)
  • Weekly 391 (3099~3102)
  • Weekly 392 (3105~3108)
  • Biweekly 128 (3110~3113)
  • Weekly 393 (3114~3117): 3116 is GREAT!
  • Weekly 394 (3120~3123)
  • Biweekly 129 (3127~3130)
  • Weekly 395 (3131~3134)
  • Weekly 396 (3136~3139): 3139 is NOT DONE!
  • Biweekly 130 (3142~3145): 3145 is NOT DONE!
  • Weekly 397 (3146~3149)
  • Weekly 398 (3151~3154)
  • Biweekly 131 (3158~3161)
  • Weekly 399 (3162~3165)
  • Weekly 400 (3168~3171)
  • Biweekly 132 (3174~3177)
  • Weekly 401 (3178~3181)
  • Weekly 402 (3184~3187)
  • Biweekly 133 (3190~3193)
  • Weekly 403 (3194~3197)
  • Weekly 404 (3200~3203)
  • Biweekly 134 (3206~3209)
  • Weekly 405 (3210~3213)
  • Weekly 406 (3216~3219): 3219 is NOT DONE!
  • Biweekly 135 (3222~3225)
  • Weekly 407 (3226~3229): 3229 is NOT DONE!
  • Weekly 408 (3232~3235)
  • Biweekly 136
  • Weekly 409
  • Weekly 410
  • Biweekly 137
  • Weekly 411
  • Weekly 412
  • Weekly 433 (3427~3430)

TODO:

  • No.0028 (string), KMP
  • No.0370 (array)
  • No.1094 (array)
  • No.1089 (array)
  • No.0124 (binary tree)
  • No.0297 (binary tree), try other methods
  • No.1644 (LCA)
  • No.1650 (LCA)
  • No.1676 (LCA)
  • No.0323 (graph), UnionFind
  • No.1135 (graph), MST (Prim's algorithm or Kruskal's algorithm)
  • No.1584 (graph), MST (Prim's algorithm or Kruskal's algorithm)
  • No.0146 (LRU Cache)
  • No.0460 (LFU Cache)
  • No.1143 (LCS)
  • No.1035 (LCS, DP)
  • No.0518 (DP), turn into a Knapsack problem
  • No.2140 (DP, iterate in reverse order)
  • No.2466 (DP)
  • No.1799 (DP with bitmask)
  • No.0265 (DP), try a better solution
  • No.0174 (DP), rethink
  • No.0514 (DP), rethink
  • No.0837 (DP)
  • No.1547 (DP)
  • No.2763 (weekly contest 352)
  • No.1024
  • No.0218 (Sweep line)
  • No.0929 (DP)
  • No.0269 (Topological sorting)
  • No.787 (Graph, Shortest path)
  • No.721 (Graph, Union-Find)
  • No.2096 (LCA)
  • No.2509 (LCA)
  • No.0030 (sliding window)
  • No.0076 (sliding window)
  • No.2742 (DP)
  • No.1000 (DP)
  • No.255 (BST)
  • No.2916 (Segment tree)
  • No.2926 (DP)
  • No.2954

Liked Problems

Problem Tags Difficulty
2375. Construct Smallest Number From DI String Backtracking, Greedy 🔥 1642
98. Validate Binary Search Tree Binary Search Tree Medium
450. Delete Node in a BST Binary Search Tree Medium
701. Insert into a Binary Search Tree Binary Search Tree Medium
2513. Minimize the Maximum of Two Arrays Binary Search, Inclusive-Exclusive Principle 🔥 2302
3116. Kth Smallest Amount With Single Denomination Combination Binary Search, Inclusive-Exclusive Principle, Bit Manipulation
2528. Maximize the Minimum Powered City Binary Search, Sliding Window 🔥2236
1508. Range Sum of Sorted Subarray Sums Binary Search, Sliding Window 🔥1402
222. Count Complete Tree Nodes Complete Binary Tree Easy+
3428. Maximum and Minimum Sums of at Most Size K Subsequences Combinatorics, Dynamic Programming Medium+
968. Binary Tree Cameras Dynamic Programming, Binary Tree 🔥2124
1872. Stone Game VIII Dynamic Programming, Game Theory 🔥2440
907. Sum of Subarray Minimums Dynamic Programming, Monotonic Stack 🔥1976
1504. Count Submatrices With All Ones Dynamic Programming, Monotonic Stack 🔥1845
2945. Find Maximum Non-decreasing Array Length Dynamic Programming, Prefix Sum, Monotonic Queue 🔥2943
2597. The Number of Beautiful Subsets7 Dynamic Programming, Sorting, Backtracking 🔥2023
1092. Shortest Common Supersequence Dynamic Programming, String 🔥1977
3068. Find the Maximum Sum of Node Values Dynamic Programming, Tree 🔥2268
787. Cheapest Flights Within K Stops Graph, Shortest Path 🔥1786
3022. Minimize OR of Remaining Elements Using Operations Greedy, Bitmask 🔥2918
1686. Stone Game VI Greedy, Game Theory 🔥2001
2029. Stone Game IX Greedy, Game Theory 🔥2277
630. Course Schedule III Greedy, Priority Queue Hard
1642. Furthest Building You Can Reach Greedy, Priority Queue 🔥1962
1838. Frequency of the Most Frequent Element Greedy, Sliding Window 🔥1876
2866. Beautiful Towers II Monotonic Stack 🔥2072
962. Maximum Width Ramp Monotonic Stack, Binary Search, Two Pointers 🔥1608
1442. Count Triplets That Can Form Two Arrays of Equal XOR Prefix Sum, Hash Map 🔥1525
2025. Maximum Number of Ways to Partition an Array Prefix Sum, Hash Map 🔥2218
2949. Count Beautiful Substrings II Prefix Sum, Hash Map 🔥2445
42. Trapping Rain Water Prefix Sum, Monotonic Stack, Two Pointers Hard
1915. Number of Wonderful Substrings Prefix Sum, Hash Map, State Compression 🔥2235
407. Trapping Rain Water II Priority Queue, BFS Hard
2402. Meeting Rooms III Priority Queue, Simulation 🔥2093
218. The Skyline Problem Line Sweep, Ordered Set Hard
315. Count of Smaller Numbers After Self Merge Sort, Two Pointers, Binary Indexed Tree Hard
493. Reverse Pairs Merge Sort, Two Pointers, Binary Indexed Tree, Binary Search Hard
395. Longest Substring with At Least K Repeating Characters Sliding Window Medium
2401. Longest Nice Subarray Sliding Window, Bit Manipulation 🔥1750
2106. Maximum Fruits Harvested After at Most K Steps Sliding Window, Binary Search 🔥2062
1610. Maximum Number of Visible Points Sliding Window, Geometry 🔥2147
2968. Apply Operations to Maximize Frequency Score Sliding Window, Median Theorem 🔥2444
1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Sliding Window, Monotonic Queue, Multiset 🔥1672
2781. Length of the Longest Valid Substring Sliding Window, Trie 🔥2204
3045. Count Prefix and Suffix Pairs II Trie, KMP 🔥2328
1574. Shortest Subarray to be Removed to Make Array Sorted Two Pointers 🔥1932
1712. Ways to Split Array Into Three Subarrays Two Pointers, Prefix Sum, Binary Search 🔥2079
2444. Count Subarrays With Fixed Bounds Two Pointers 🔥2093
2972. Count the Number of Incremovable Subarrays II Two Pointers 🔥2153
2709. Greatest Common Divisor Traversal Union Find, Number Theory 🔥2172

About

LeetCode solutions in C++.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /