This repository contains the solutions and explanations to the algorithm problems on LeetCode. Only medium or above are included. All are written in C++/Python and implemented by myself. The problems attempted multiple times are labelled with hyperlinks.
392 Is Subsequence Easy JavaScript Python 393 UTF-8 Validation Medium Python 394 Decode String Medium JavaScript 395 Longest Substring with At Least K Repeating Characters Medium Python 396 Rotate Function Medium Python 397 Integer Replacement Medium JavaScript 398 Random Pick Index Medium Python 399 Eva...
399 Evaluate Division 48.5% Medium 400 Nth Digit 30.6% Medium 402 Remove K Digits 27.0% Medium 406 Queue Reconstruction by Height 60.8% Medium 413 Arithmetic Slices 56.3% Medium 416 Partition Equal Subset Sum 41.5% Medium 417 Pacific Atlantic Water Flow 38.2% Medium 418 Sentence Screen...
1125 最小的必要团队 - Smallest Sufficient Team C++ Java Python3 Hard 1124 表现良好的最长时间段 - Longest Well-Performing Interval C++ Java Python3 Medium 1123 最深叶节点的最近公共祖先 - Lowest Common Ancestor of Deepest Leaves C++ Java Python3 Medium 1122 数组的相对排序 - Relative Sort Array ...
399 evaluate-division Medium 400 nth-digit Easy 401 binary-watch Easy 402 remove-k-digits Medium 403 frog-jump 📝 Hard 404 sum-of-left-leaves Easy 405 convert-a-number-to-hexadecimal Python Easy 406 queue-reconstruction-by-height Medium 407 trapping-rain-water-ii Hard 408 valid-word-abbrevi...
7 reverse-integer Python 📝 Easy 8 string-to-integer-atoi Python Python3 Medium 9 palindrome-number Python 📝 Easy 10 regular-expression-matching 📝 Hard 11 container-with-most-water 📝 Medium 12 integer-to-roman Python Python3 Medium 13 roman-to-integer Python3 Python Easy 14 longest-...
My Solutions to Leetcode problems. All solutions support C++ language, some support Java and Python. Multiple solutions will be given by most problems. Enjoy:) 我的Leetcode解答。所有的问题都支持C++语言,一部分问题支持Java语言。近乎所有问题都会提供多个算
399 Evaluate Division.py 400 Nth Digit.py 401 Binary Watch.py 402 Remove K Digits.py 403 Frog Jump.py 404 Sum of Left Leaves.py 405 Convert a Number to Hexadecimal.py 406 Queue Reconstruction by Height.py 407 Trapping Rain Water II.py 408 Valid Word Abbreviation.py 409 ...
399 Paint Fence.java Easy Java [DP, Sequence DP] 400 Binary Tree Zigzag Level Order Traversal.java Medium Java [BFS, Stack, Tree] 401 Word Break.java Medium Java [DP, Hash Table, Sequence DP] 402 Best Time to Buy and Sell Stock.java Easy Java [Array, DP, Sequence DP] 403 Be...
✅ Solutions to LeetCode by Go, 100% test coverage, runtime beats 100% / LeetCode 题解 books.halfrost.com/leetcode MIT License 0 stars 1.1k forks Star Watch Code Pull requests Actions Projects Security Insights master 5 branches 2 tags Go to file Code Clone HTTPS GitHub ...