Convert Figma logo to code with AI

grandyang logoleetcode

Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.

6,149
737
6,149
2,013

Top Related Projects

54,606

LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)

Demonstrate all the questions on LeetCode in the form of animation.(用动画的形式呈现解LeetCode题目的思路)

🏋️ Python / Modern C++ Solutions of All 3283 LeetCode Problems (Weekly Update)

Solutions to LeetCode problems; updated daily. Subscribe to my YouTube channel for more.

:pencil2: LeetCode solutions in C++ 11 and Python3

Quick Overview

The grandyang/leetcode repository is a comprehensive collection of LeetCode problem solutions implemented in C++. It contains detailed explanations and code for a wide range of algorithmic problems, serving as a valuable resource for those preparing for coding interviews or improving their problem-solving skills.

Pros

  • Extensive coverage of LeetCode problems with well-commented C++ solutions
  • Includes explanations and analysis for each problem, helping users understand the thought process
  • Regularly updated with new problems and solutions
  • Organized structure makes it easy to navigate and find specific problems

Cons

  • Solutions are primarily in C++, which may not be ideal for users preferring other programming languages
  • Some explanations might be too concise for beginners
  • Lack of unit tests or performance benchmarks for the solutions
  • May encourage over-reliance on solutions instead of independent problem-solving

Code Examples

Here are a few examples of problem solutions from the repository:

  1. Two Sum problem:
class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
        unordered_map<int, int> m;
        for (int i = 0; i < nums.size(); ++i) {
            if (m.count(target - nums[i])) {
                return {m[target - nums[i]], i};
            }
            m[nums[i]] = i;
        }
        return {};
    }
};
  1. Reverse Linked List:
class Solution {
public:
    ListNode* reverseList(ListNode* head) {
        ListNode *prev = nullptr, *cur = head;
        while (cur) {
            ListNode *next = cur->next;
            cur->next = prev;
            prev = cur;
            cur = next;
        }
        return prev;
    }
};
  1. Binary Tree Inorder Traversal:
class Solution {
public:
    vector<int> inorderTraversal(TreeNode* root) {
        vector<int> res;
        stack<TreeNode*> s;
        TreeNode *p = root;
        while (p || !s.empty()) {
            while (p) {
                s.push(p);
                p = p->left;
            }
            p = s.top(); s.pop();
            res.push_back(p->val);
            p = p->right;
        }
        return res;
    }
};

Getting Started

To use this repository:

  1. Clone the repository:
    git clone https://github.com/grandyang/leetcode.git
    
  2. Navigate to the problem you're interested in.
  3. Read the problem description and explanation.
  4. Study the C++ solution and adapt it to your needs.
  5. Compile and run the code to test it with your own inputs.

Remember to try solving problems on your own before referring to the solutions.

Competitor Comparisons

54,606

LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)

Pros of leetcode (azl397985856)

  • More comprehensive explanations and detailed problem-solving approaches
  • Includes visualizations and diagrams to aid understanding
  • Offers solutions in multiple programming languages

Cons of leetcode (azl397985856)

  • Less frequently updated compared to grandyang's repository
  • May have more complex explanations, potentially overwhelming for beginners

Code Comparison

leetcode (grandyang):

class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
        unordered_map<int, int> m;
        for (int i = 0; i < nums.size(); ++i) {
            if (m.count(target - nums[i])) return {m[target - nums[i]], i};
            m[nums[i]] = i;
        }
        return {};
    }
};

leetcode (azl397985856):

function twoSum(nums, target) {
  const map = new Map();
  for (let i = 0; i < nums.length; i++) {
    const complement = target - nums[i];
    if (map.has(complement)) return [map.get(complement), i];
    map.set(nums[i], i);
  }
}

Both repositories provide solutions to LeetCode problems, but they differ in their approach and presentation. The grandyang repository offers concise C++ solutions, while the azl397985856 repository provides more detailed explanations and solutions in multiple languages, including JavaScript as shown above.

Demonstrate all the questions on LeetCode in the form of animation.(用动画的形式呈现解LeetCode题目的思路)

Pros of LeetCodeAnimation

  • Provides animated visualizations of algorithms, making concepts easier to understand
  • Includes explanations in both Chinese and English, catering to a wider audience
  • Offers a more interactive and engaging learning experience

Cons of LeetCodeAnimation

  • Covers fewer LeetCode problems compared to leetcode
  • Animations may not be as detailed or comprehensive as written explanations
  • Updates less frequently, potentially missing newer LeetCode problems

Code Comparison

LeetCodeAnimation (Python):

def twoSum(nums, target):
    hash_table = {}
    for i, num in enumerate(nums):
        if target - num in hash_table:
            return [hash_table[target - num], i]
        hash_table[num] = i
    return []

leetcode (C++):

vector<int> twoSum(vector<int>& nums, int target) {
    unordered_map<int, int> m;
    for (int i = 0; i < nums.size(); ++i) {
        if (m.count(target - nums[i])) return {m[target - nums[i]], i};
        m[nums[i]] = i;
    }
    return {};
}

Both repositories provide solutions to the "Two Sum" problem, but LeetCodeAnimation focuses on visual explanations, while leetcode offers a more extensive collection of written solutions across multiple programming languages.

🏋️ Python / Modern C++ Solutions of All 3283 LeetCode Problems (Weekly Update)

Pros of LeetCode-Solutions

  • More comprehensive language coverage, including Python, C++, Java, and others
  • Generally more detailed explanations and comments within solutions
  • More frequent updates and active maintenance

Cons of LeetCode-Solutions

  • Less consistent formatting across solutions
  • May be overwhelming for beginners due to multiple language implementations

Code Comparison

LeetCode-Solutions (Python):

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        num_map = {}
        for i, num in enumerate(nums):
            if target - num in num_map:
                return [num_map[target - num], i]
            num_map[num] = i
        return []

leetcode (C++):

class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
        unordered_map<int, int> m;
        for (int i = 0; i < nums.size(); ++i) {
            if (m.count(target - nums[i])) return {m[target - nums[i]], i};
            m[nums[i]] = i;
        }
        return {};
    }
};

Both repositories offer high-quality LeetCode solutions, but LeetCode-Solutions provides a wider range of language implementations and more detailed explanations. However, leetcode may be more suitable for beginners due to its consistent formatting and focus on C++ solutions. The code comparison shows similar approaches to the "Two Sum" problem, with LeetCode-Solutions using Python and leetcode using C++.

Solutions to LeetCode problems; updated daily. Subscribe to my YouTube channel for more.

Pros of Leetcode

  • More comprehensive coverage of LeetCode problems, including newer additions
  • Solutions provided in multiple programming languages (Java, Python, C++, etc.)
  • Includes detailed explanations and time/space complexity analysis for many solutions

Cons of Leetcode

  • Less consistent formatting and organization compared to leetcode
  • Some solutions may lack detailed explanations or comments
  • Repository structure might be more challenging to navigate for beginners

Code Comparison

Leetcode (Java):

public int maxProfit(int[] prices) {
    int maxProfit = 0;
    for (int i = 1; i < prices.length; i++) {
        if (prices[i] > prices[i - 1]) {
            maxProfit += prices[i] - prices[i - 1];
        }
    }
    return maxProfit;
}

leetcode (C++):

class Solution {
public:
    int maxProfit(vector<int>& prices) {
        int res = 0;
        for (int i = 1; i < prices.size(); ++i) {
            res += max(0, prices[i] - prices[i - 1]);
        }
        return res;
    }
};

Both repositories offer valuable resources for LeetCode problem-solving, with Leetcode providing more language options and comprehensive coverage, while leetcode offers a more consistent and organized approach. The code comparison shows similar implementations of the "Best Time to Buy and Sell Stock II" problem, with minor differences in syntax and variable naming.

:pencil2: LeetCode solutions in C++ 11 and Python3

Pros of LeetCode

  • Solutions are primarily in C++, offering a focused approach for C++ developers
  • Includes detailed explanations and analysis for many problems
  • Repository structure is clean and well-organized by problem difficulty

Cons of LeetCode

  • Less comprehensive coverage of LeetCode problems compared to leetcode
  • Fewer language options for solutions (mainly C++)
  • Less frequent updates and contributions

Code Comparison

LeetCode (C++):

class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
        unordered_map<int, int> map;
        for (int i = 0; i < nums.size(); ++i) {
            if (map.count(target - nums[i])) 
                return {map[target - nums[i]], i};
            map[nums[i]] = i;
        }
        return {};
    }
};

leetcode (Python):

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        hash_map = {}
        for i, num in enumerate(nums):
            if target - num in hash_map:
                return [hash_map[target - num], i]
            hash_map[num] = i
        return []

Both repositories provide solutions to LeetCode problems, but they differ in their primary language focus and the breadth of problems covered. LeetCode offers in-depth C++ solutions with explanations, while leetcode provides a wider range of problems and language options.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

LeetCode All In One

English | 简体中文


Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.

Same as this: LeetCode All in One 题目讲解汇总(持续更新中...)

Click below image to watch YouTube Video Video

Note: All explanations are written in Github Issues, please do not create any new issue or pull request in this project since the problem index should be consistent with the issue index, thanks!

('$' means the problem is locked on Leetcode, '*' means the problem is related to Database, '#' means the problem is related to Shell, '~' means the concurrency problems.)

#TitleSolutionDifficulty
1352Product of the Last K Numbers50.20%Medium
1351Count Negative Numbers in a Sorted Matrix77.30%Easy
1350Students With Invalid Departments * $89.90%Easy
1349Maximum Students Taking Exam49.80%Hard
1348Tweet Counts Per Frequency44.00%Medium
1347Minimum Number of Steps to Make Two Strings Anagram78.00%Medium
1346Check If N and Its Double Exist36.70%Easy
1345Jump Game IV46.60%Hard
1344Angle Between Hands of a Clock63.40%Medium
1343Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold68.10%Medium
1342Number of Steps to Reduce a Number to Zero84.90%Easy
1341Movie Rating *43.80%Medium
1340Jump Game V62.60%Hard
1339Maximum Product of Splitted Binary Tree47.70%Medium
1338Reduce Array Size to The Half69.20%Medium
1337The K Weakest Rows in a Matrix71.40%Easy
1336Number of Transactions per Visit *48.10%Hard
1335Minimum Difficulty of a Job Schedule58.30%Hard
1334Find the City With the Smallest Number of Neighbors at a Threshold Distance57.70%Medium
1333"Filter Restaurants by Vegan-FriendlyPrice and Distance"60.50%
1332Remove Palindromic Subsequences76.20%Easy
1331Rank Transform of an Array59.80%Easy
1330Reverse Subarray To Maximize Array Value41.30%Hard
1329Sort the Matrix Diagonally83.00%Medium
1328Break a Palindrome52.10%Medium
1327List the Products Ordered in a Period *71.90%Easy
1326Minimum Number of Taps to Open to Water a Garden51.60%Hard
1325Delete Leaves With a Given Value74.40%Medium
1324Print Words Vertically62.40%Medium
1323Maximum 69 Number82.00%Easy
1322Ads Performance * $60.10%Easy
1321Restaurant Growth *53.40%Medium
1320Minimum Distance to Type a Word Using Two Fingers59.80%Hard
1319Number of Operations to Make Network Connected58.50%Medium
1318Minimum Flips to Make a OR b Equal to c66.00%Medium
1317Convert Integer to the Sum of Two No-Zero Integers56.00%Easy
1316Distinct Echo Substrings49.70%Hard
1315Sum of Nodes with Even-Valued Grandparent85.60%Medium
1314Matrix Block Sum75.40%Medium
1313Decompress Run-Length Encoded List85.90%Easy
1312Minimum Insertion Steps to Make a String Palindrome65.70%Hard
1311Get Watched Videos by Your Friends45.90%Medium
1310XOR Queries of a Subarray72.20%Medium
1309Decrypt String from Alphabet to Integer Mapping79.50%Easy
1308Running Total for Different Genders * $88.20%Medium
1307Verbal Arithmetic Puzzle34.80%Hard
1306Jump Game III63.10%Medium
1305All Elements in Two Binary Search Trees79.80%Medium
1304Find N Unique Integers Sum up to Zero77.10%Easy
1303Find the Team Size * $90.80%Easy
1302Deepest Leaves Sum86.90%Medium
1301Number of Paths with Max Score38.70%Hard
1300Sum of Mutated Array Closest to Target43.10%Medium
1299Replace Elements with Greatest Element on Right Side74.70%Easy
1298Maximum Candies You Can Get from Boxes60.90%Hard
1297Maximum Number of Occurrences of a Substring52.00%Medium
1296Divide Array in Sets of K Consecutive Numbers56.60%Medium
1295Find Numbers with Even Number of Digits77.00%Easy
1294Weather Type in Each Country * $68.00%Easy
1293Shortest Path in a Grid with Obstacles Elimination45.60%Hard
1292Maximum Side Length of a Square with Sum Less than or Equal to Threshold52.10%Medium
1291Sequential Digits60.90%Medium
1290Convert Binary Number in a Linked List to Integer82.70%Easy
1289Minimum Falling Path Sum II61.20%Hard
1288Remove Covered Intervals57.40%Medium
1287Element Appearing More Than 25% In Sorted Array59.50%Easy
1286Iterator for Combination73.20%Medium
1285Find the Start and End Number of Continuous Ranges * $88.30%Medium
1284Minimum Number of Flips to Convert Binary Matrix to Zero Matrix72.00%Hard
1283Find the Smallest Divisor Given a Threshold53.70%Medium
1282Group the People Given the Group Size They Belong To85.20%Medium
1281Subtract the Product and Sum of Digits of an Integer86.30%Easy
1280Students and Examinations * $74.60%Easy
1279Traffic Light Controlled Intersection ~ $75.30%Easy
1278Palindrome Partitioning III60.90%Hard
1277Count Square Submatrices with All Ones74.20%Medium
1276Number of Burgers with No Waste of Ingredients50.60%Medium
1275Find Winner on a Tic Tac Toe Game54.90%Easy
1274Number of Ships in a Rectangle $68.60%Hard
1273Delete Tree Nodes $61.20%Medium
1272Remove Interval $61.10%Medium
1271Hexspeak $56.30%Easy
1270All People Report to the Given Manager * $88.10%Medium
1269Number of Ways to Stay in the Same Place After Some Steps43.40%Hard
1268Search Suggestions System65.40%Medium
1267Count Servers that Communicate58.30%Medium
1266Minimum Time Visiting All Points79.20%Easy
1265Print Immutable Linked List in Reverse $94.30%Medium
1264Page Recommendations * $67.70%Medium
1263Minimum Moves to Move a Box to Their Target Location48.30%Hard
1262Greatest Sum Divisible by Three50.80%Medium
1261Find Elements in a Contaminated Binary Tree75.70%Medium
1260Shift 2D Grid62.10%Easy
1259Handshakes That Don't Cross $54.40%Hard
1258Synonymous Sentences $57.40%Medium
1257Smallest Common Region $62.10%Medium
1256Encode Number $69.00%Medium
1255Maximum Score Words Formed by Letters71.30%Hard
1254Number of Closed Islands62.70%Medium
1253Reconstruct a 2-Row Binary Matrix42.70%Medium
1252Cells with Odd Values in a Matrix78.50%Easy
1251Average Selling Price * $83.20%Easy
1250Check If It Is a Good Array57.50%Hard
1249Minimum Remove to Make Valid Parentheses65.00%Medium
1248Count Number of Nice Subarrays57.60%Medium
1247Minimum Swaps to Make Strings Equal63.60%Medium
1246Palindrome Removal $45.80%Hard
1245Tree Diameter $62.00%Medium
1244Design A Leaderboard $67.30%Medium
1243Array Transformation $50.10%Easy
1242Web Crawler Multithreaded ~ $48.20%Medium
1241Number of Comments per Post * $68.00%Easy
1240Tiling a Rectangle with the Fewest Squares52.40%Hard
1239Maximum Length of a Concatenated String with Unique Characters50.70%Medium
1238Circular Permutation in Binary Representation67.90%Medium
1237Find Positive Integer Solution for a Given Equation69.70%Medium
1236Web Crawler $65.40%Medium
1235Maximum Profit in Job Scheduling50.50%Hard
1234Replace the Substring for Balanced String35.50%Medium
1233Remove Sub-Folders from the Filesystem64.50%Medium
1232Check If It Is a Straight Line42.30%Easy
1231Divide Chocolate $55.50%Hard
1230Toss Strange Coins $50.80%Medium
1229Meeting Scheduler $54.70%Medium
1228Missing Number In Arithmetic Progression $51.20%Medium
1227Airplane Seat Assignment Probability63.00%Medium
1226The Dining Philosophers ~60.20%Medium
1225Report Contiguous Dates *63.80%Hard
1224Maximum Equal Frequency36.20%Hard
1223Dice Roll Simulation47.40%Hard
1222Queens That Can Attack the King70.20%Medium
1221Split a String in Balanced Strings84.60%Easy
1220Count Vowels Permutation56.60%Hard
1219Path with Maximum Gold66.10%Medium
1218Longest Arithmetic Subsequence of Given Difference48.10%Medium
1217Minimum Cost to Move Chips to The Same Position70.70%Easy
1216Valid Palindrome III $50.80%Hard
1215Stepping Numbers $44.60%Medium
1214Two Sum BSTs $67.30%Medium
1213Intersection of Three Sorted Arrays $79.80%Easy
1212Team Scores in Football Tournament *57.00%Medium
1211Queries Quality and Percentage *70.40%Easy
1210Minimum Moves to Reach Target with Rotations47.50%Hard
1209Remove All Adjacent Duplicates in String II56.40%Medium
1208Get Equal Substrings Within Budget45.30%Medium
1207Unique Number of Occurrences72.40%Easy
1206Design Skiplist59.60%Hard
1205Monthly Transactions II *45.30%Medium
1204Last Person to Fit in the Bus *73.00%Medium
1203Sort Items by Groups Respecting Dependencies48.80%Hard
1202Smallest String With Swaps50.50%Medium
1201Ugly Number III27.20%Medium
1200Minimum Absolute Difference67.30%Easy
1199Minimum Time to Build Blocks $39.40%Hard
1198Find Smallest Common Element in All Rows $76.30%Medium
1197Minimum Knight Moves $38.60%Medium
1196How Many Apples Can You Put into the Basket $68.30%Easy
1195Fizz Buzz Multithreaded ~71.40%Medium
1194Tournament Winners *52.70%Hard
1193Monthly Transactions I *68.70%Medium
1192Critical Connections in a Network51.80%Hard
1191K-Concatenation Maximum Sum24.60%Medium
1190Reverse Substrings Between Each Pair of Parentheses65.00%Medium
1189Maximum Number of Balloons62.00%Easy
1188Design Bounded Blocking Queue ~73.20%Medium
1187Make Array Strictly Increasing43.80%Hard
1186Maximum Subarray Sum with One Deletion39.80%Medium
1185Day of the Week59.90%Easy
1184Distance Between Bus Stops53.90%Easy
1183Maximum Number of Ones $58.70%Hard
1182Shortest Distance to Target Color $54.30%Medium
1181Before and After Puzzle $44.70%Medium
1180Count Substrings with Only One Distinct Letter $78.30%Easy
1179Reformat Department Table *82.10%Easy
1178Number of Valid Words for Each Puzzle40.80%Hard
1177Can Make Palindrome from Substring36.50%Medium
1176Diet Plan Performance $53.50%Easy
1175Prime Arrangements51.90%Medium
1174Immediate Food Delivery II *63.10%Medium
1173Immediate Food Delivery I *83.10%Easy
1172Dinner Plate Stacks36.40%Hard
1171Remove Zero Sum Consecutive Nodes from Linked List41.90%Medium
1170Compare Strings by Frequency of the Smallest Character60.60%Medium
1169Invalid Transactions30.40%Medium
1168Optimize Water Distribution in a Village $62.30%Hard
1167Minimum Cost to Connect Sticks $65.70%Medium
1166Design File System $59.00%Medium
1165Single-Row Keyboard $85.50%Easy
1164Product Price at a Given Date *69.00%Medium
1163Last Substring in Lexicographical Order36.00%Hard
1162As Far from Land as Possible46.60%Medium
1161Maximum Level Sum of a Binary Tree67.50%Medium
1160Find Words That Can Be Formed by Characters67.80%Easy
1159Market Analysis II *57.00%Hard
1158Market Analysis I *65.00%Medium
1157Online Majority Element In Subarray41.60%Hard
1156Swap For Longest Repeated Character Substring47.20%Medium
1155Number of Dice Rolls With Target Sum47.70%Medium
1154Day of the Year50.10%Easy
1153String Transforms Into Another String $35.60%Hard
1152Analyze User Website Visit Pattern $43.20%Medium
1151Minimum Swaps to Group All 1's Together $51.90%Medium
1150Check If a Number Is Majority Element in a Sorted Array $57.10%Easy
1149Article Views II * $48.20%Medium
1148Article Views I * $77.10%Easy
1147Longest Chunked Palindrome Decomposition59.80%Hard
1146Snapshot Array37.00%Medium
1145Binary Tree Coloring Game51.10%Medium
1144Decrease Elements To Make Array Zigzag46.50%Medium
1143Longest Common Subsequence58.80%Medium
1142User Activity for the Past 30 Days II * $35.50%Easy
1141User Activity for the Past 30 Days I * $54.60%Easy
1140Stone Game II64.60%Medium
1139Largest 1-Bordered Square48.70%Medium
1138Alphabet Board Path51.60%Medium
1137N-th Tribonacci Number55.70%Easy
1136Parallel Courses $60.70%Medium
1135Connecting Cities With Minimum Cost $60.00%Easy
1134Armstrong Number $78.50%Easy
1133Largest Unique Number $67.20%Easy
1132Reported Posts II * $34.40%Medium
1131Maximum of Absolute Value Expression51.30%Medium
1130Minimum Cost Tree From Leaf Values67.40%Medium
1129Shortest Path with Alternating Colors40.70%Medium
1128Number of Equivalent Domino Pairs45.90%Easy
1127User Purchase Platform * $50.80%Hard
1126Active Businesses * $68.40%Medium
1125Smallest Sufficient Team47.20%Hard
1124Longest Well-Performing Interval33.50%Medium
1123Lowest Common Ancestor of Deepest Leaves68.50%Medium
1122Relative Sort Array67.90%Easy
1121Divide Array Into Increasing Sequences $59.00%Hard
1120Maximum Average Subtree $64.50%Medium
1119Remove Vowels from a String $90.50%Easy
1118Number of Days in a Month $57.30%Easy
1117Building H2O ~53.10%Medium
1116Print Zero Even Odd ~58.20%Medium
1115Print FooBar Alternately ~59.00%Medium
1114Print in Order ~67.60%Easy
1113Reported Posts * $66.40%Medium
1112Highest Grade For Each Student * $72.80%Medium
1111Maximum Nesting Depth of Two Valid Parentheses Strings72.70%Medium
1110Delete Nodes And Return Forest68.00%Medium
1109Corporate Flight Bookings54.30%Medium
1108Defanging an IP Address88.40%Easy
1107New Users Daily Count * $46.10%Medium
1106Parsing A Boolean Expression59.50%Hard
1105Filling Bookcase Shelves57.50%Medium
1104Path In Zigzag Labelled Binary Tree73.50%Medium
1103Distribute Candies to People63.40%Easy
1102Path With Maximum Minimum Value $51.00%Medium
1101The Earliest Moment When Everyone Become Friends $67.80%Medium
1100Find K-Length Substrings With No Repeated Characters $73.10%Medium
1099Two Sum Less Than K $60.80%Easy
1098Unpopular Books * $45.50%Medium
1097Game Play Analysis V * $57.00%Hard
1096Brace Expansion II62.90%Hard
1095Find in Mountain Array36.10%Hard
1094Car Pooling59.70%Medium
1093Statistics from a Large Sample48.50%Medium
1092Shortest Common Supersequence53.40%Hard
1091Shortest Path in Binary Matrix40.30%Medium
1090Largest Values From Labels60.10%Medium
1089Duplicate Zeros51.60%Easy
1088Confusing Number II45.60%Hard
1087Brace Expansion $63.20%Medium
1086High Five $77.50%Easy
1085Sum of Digits in the Minimum Number $75.10%Easy
1084Sales Analysis III * $54.80%Easy
1083Sales Analysis II * $50.80%Easy
1082Sales Analysis I * $73.90%Easy
1081Smallest Subsequence of Distinct Characters53.60%Medium
1080Insufficient Nodes in Root to Leaf Paths50.10%Medium
1079Letter Tile Possibilities75.90%Medium
1078Occurrences After Bigram65.00%Easy
1077Project Employees III * $78.00%Medium
1076Project Employees II * $52.80%Easy
1075Project Employees I * $66.20%Easy
1074Number of Submatrices That Sum to Target62.00%Hard
1073Adding Two Negabinary Numbers34.80%Medium
1072Flip Columns For Maximum Number of Equal Rows61.60%Medium
1071Greatest Common Divisor of Strings51.50%Easy
1070Product Sales Analysis III * $49.90%Medium
1069Product Sales Analysis II * $83.30%Easy
1068Product Sales Analysis I * $82.10%Easy
1067Digit Count in Range $41.60%Hard
1066Campus Bikes II $54.20%Medium
1065Index Pairs of a String $61.00%Easy
1064Fixed Point $64.90%Easy
1063Number of Valid Subarrays $72.10%Hard
1062Longest Repeating Substring $58.40%Medium
1061Lexicographically Smallest Equivalent String $66.90%Medium
1060Missing Element in Sorted Array $54.80%Medium
1059All Paths from Source Lead to Destination $43.00%Medium
1058Minimize Rounding Error to Meet Target $43.70%Medium
1057Campus Bikes $57.80%Medium
1056Confusing Number $47.00%Easy
1055Shortest Way to Form String $57.20%Medium
1054Distant Barcodes44.20%Medium
1053Previous Permutation With One Swap51.20%Medium
1052Grumpy Bookstore Owner55.90%Medium
1051Height Checker72.10%Easy
1050Actors and Directors Who Cooperated At Least Three Times * $72.40%Easy
1049Last Stone Weight II45.40%Medium
1048Longest String Chain55.50%Medium
1047Remove All Adjacent Duplicates In String70.90%Easy
1046Last Stone Weight62.40%Easy
1045Customers Who Bought All Products * $68.40%Medium
1044Longest Duplicate Substring31.40%Hard
1043Partition Array for Maximum Sum67.10%Medium
1042Flower Planting With No Adjacent48.80%Medium
1041Robot Bounded In Circle55.00%Medium
1040Moving Stones Until Consecutive II54.10%Medium
1039Minimum Score Triangulation of Polygon50.10%Medium
1038Binary Search Tree to Greater Sum Tree82.30%Medium
1037Valid Boomerang37.80%Easy
1036Escape a Large Maze34.50%Hard
1035Uncrossed Lines56.10%Medium
1034Coloring A Border45.70%Medium
1033Moving Stones Until Consecutive43.20%Easy
1032Stream of Characters48.60%Hard
1031Maximum Sum of Two Non-Overlapping Subarrays58.90%Medium
1030Matrix Cells in Distance Order66.90%Easy
1029Two City Scheduling57.90%Medium
1028Recover a Tree From Preorder Traversal70.90%Hard
1027Longest Arithmetic Subsequence49.80%Medium
1026Maximum Difference Between Node and Ancestor69.40%Medium
1025Divisor Game66.20%Easy
1024Video Stitching49.00%Medium
1023Camelcase Matching57.40%Medium
1022Sum of Root To Leaf Binary Numbers71.50%Easy
1021Remove Outermost Parentheses79.00%Easy
1020Number of Enclaves58.90%Medium
1019Next Greater Node In Linked List58.20%Medium
1018Binary Prefix Divisible By 547.80%Easy
1017Convert to Base -259.60%Medium
1016Binary String With Substrings Representing 1 To N58.90%Medium
1015Smallest Integer Divisible by K41.80%Medium
1014Best Sightseeing Pair52.90%Medium
1013Partition Array Into Three Parts With Equal Sum49.10%Easy
1012Numbers With Repeated Digits37.80%Hard
1011Capacity To Ship Packages Within D Days59.70%Medium
1010Pairs of Songs With Total Durations Divisible by 6050.10%Medium
1009Complement of Base 10 Integer61.50%Easy
1008Construct Binary Search Tree from Preorder Traversal78.80%Medium
1007Minimum Domino Rotations For Equal Row50.90%Medium
1006Clumsy Factorial53.70%Medium
1005Maximize Sum Of Array After K Negations52.40%Easy
1004Max Consecutive Ones III60.50%Medium
1003Check If Word Is Valid After Substitutions56.10%Medium
1002Find Common Characters68.10%Easy
1001Grid Illumination36.60%Hard
1000Minimum Cost to Merge Stones40.40%Hard
999Available Captures for Rook66.80%Easy
998Maximum Binary Tree II63.70%Medium
997Find the Town Judge49.80%Easy
996Number of Squareful Arrays48.00%Hard
995Minimum Number of K Consecutive Bit Flips49.60%Hard
994Rotting Oranges49.60%Medium
993Cousins in Binary Tree52.20%Easy
992Subarrays with K Different Integers50.40%Hard
991Broken Calculator46.40%Medium
990Satisfiability of Equality Equations46.50%Medium
989Add to Array-Form of Integer44.70%Easy
988Smallest String Starting From Leaf46.60%Medium
987Vertical Order Traversal of a Binary Tree37.60%Medium
986Interval List Intersections68.10%Medium
985Sum of Even Numbers After Queries60.70%Easy
984String Without AAA or BBB38.50%Medium
983Minimum Cost For Tickets62.60%Medium
982Triples with Bitwise AND Equal To Zero56.10%Hard
981Time Based Key-Value Store54.00%Medium
980Unique Paths III77.10%Hard
979Distribute Coins in Binary Tree69.30%Medium
978Longest Turbulent Subarray46.60%Medium
977Squares of a Sorted Array72.40%Easy
976Largest Perimeter Triangle58.50%Easy
975Odd Even Jump41.70%Hard
974Subarray Sums Divisible by K50.30%Medium
973K Closest Points to Origin64.40%Medium
972Equal Rational Numbers41.80%Hard
971Flip Binary Tree To Match Preorder Traversal46.10%Medium
970Powerful Integers39.90%Easy
969Pancake Sorting68.40%Medium
968Binary Tree Cameras38.40%Hard
967Numbers With Same Consecutive Differences44.30%Medium
966Vowel Spellchecker47.70%Medium
965Univalued Binary Tree67.60%Easy
964Least Operators to Express Number44.70%Hard
963Minimum Area Rectangle II51.60%Medium
962Maximum Width Ramp46.00%Medium
961N-Repeated Element in Size 2N Array74.20%Easy
960Delete Columns to Make Sorted III54.00%Hard
959Regions Cut By Slashes66.70%Medium
958Check Completeness of a Binary Tree52.30%Medium
957Prison Cells After N Days40.30%Medium
956Tallest Billboard39.70%Hard
955Delete Columns to Make Sorted II33.40%Medium
954Array of Doubled Pairs35.30%Medium
953Verifying an Alien Dictionary52.90%Easy
952Largest Component Size by Common Factor36.00%Hard
951Flip Equivalent Binary Trees65.50%Medium
950Reveal Cards In Increasing Order75.00%Medium
949Largest Time for Given Digits36.30%Medium
948Bag of Tokens46.20%Medium
947Most Stones Removed with Same Row or Column55.30%Medium
946Validate Stack Sequences63.10%Medium
945Minimum Increment to Make Array Unique46.50%Medium
944Delete Columns to Make Sorted70.90%Easy
943Find the Shortest Superstring43.20%Hard
942DI String Match73.20%Easy
941Valid Mountain Array32.20%Easy
940Distinct Subsequences II41.50%Hard
939Minimum Area Rectangle52.00%Medium
938Range Sum of BST79.90%Easy
937Reorder Data in Log Files53.70%Easy
936Stamping The Sequence38.10%Hard
935Knight Dialer43.80%Medium
934Shortest Bridge46.50%Medium
933Number of Recent Calls70.90%Easy
932Beautiful Array57.10%Medium
931Minimum Falling Path Sum61.30%Medium
930Binary Subarrays With Sum41.40%Medium
929Unique Email Addresses67.60%Easy
928Minimize Malware Spread II40.10%Hard
927Three Equal Parts32.80%Hard
926Flip String to Monotone Increasing51.60%Medium
925Long Pressed Name45.00%Easy
924Minimize Malware Spread41.70%Hard
9233Sum With Multiplicity35.30%Medium
922Sort Array By Parity II68.30%Easy
921Minimum Add to Make Parentheses Valid72.30%Medium
920Number of Music Playlists45.70%Hard
919Complete Binary Tree Inserter55.70%Medium
918Maximum Sum Circular Subarray33.20%Medium
917Reverse Only Letters56.30%Easy
916Word Subsets45.90%Medium
915Partition Array into Disjoint Intervals43.90%Medium
914X of a Kind in a Deck of Cards34.00%Easy
913Cat and Mouse29.90%Hard
912Sort an Array62.90%Medium
911Online Election48.30%Medium
910Smallest Range II24.90%Medium
909Snakes and Ladders36.10%Easy
908Smallest Range I65.00%Easy
907Sum of Subarray Minimums29.40%Medium
906Super Palindromes30.80%Hard
905Sort Array By Parity72.60%Easy
904Fruit Into Baskets41.70%Medium
903Valid Permutations for DI Sequence45.10%Hard
902Numbers At Most N Given Digit Set28.80%Hard
901Online Stock Span49.90%Medium
900RLE Iterator50.50%Medium
899Orderly Queue47.70%Hard
898Bitwise ORs of Subarrays34.70%Medium
897Increasing Order Search Tree65.20%Easy
896Monotonic Array55.40%Easy
895Maximum Frequency Stack56.70%Hard
894All Possible Full Binary Trees71.30%Medium
893Groups of Special-Equivalent Strings63.00%Easy
892Surface Area of 3D Shapes56.10%Easy
891Sum of Subsequence Widths29.20%Hard
890Find and Replace Pattern71.30%Medium
889Construct Binary Tree from Preorder and Postorder Traversal60.70%Medium
888Fair Candy Swap56.90%Easy
887Super Egg Drop24.90%Hard
886Possible Bipartition40.90%Medium
885Spiral Matrix III64.80%Medium
884Uncommon Words from Two Sentences60.90%Easy
883Projection Area of 3D Shapes65.90%Easy
882Reachable Nodes In Subdivided Graph38.20%Hard
881Boats to Save People44.10%Medium
880Decoded String at Index23.00%Medium
879Profitable Schemes36.20%Hard
878Nth Magical Number25.40%Hard
877Stone Game61.10%Medium
876Middle of the Linked List63.80%Easy
875Koko Eating Bananas45.90%Medium
874Walking Robot Simulation31.70%Easy
873Length of Longest Fibonacci Subsequence46.00%Medium
872Leaf-Similar Trees63.10%Easy
871Minimum Number of Refueling Stops28.70%Hard
870Advantage Shuffle42.20%Medium
869Reordered Power of 250.60%Medium
868Binary Gap59.30%Easy
867Transpose Matrix63.90%Easy
866Prime Palindrome20.00%Medium
865Smallest Subtree with all the Deepest Nodes55.40%Medium
864Shortest Path to Get All Keys35.70%Hard
863All Nodes Distance K in Binary Tree46.80%Medium
862Shortest Subarray with Sum at Least K22.00%Hard
861Score After Flipping Matrix69.30%Medium
860Lemonade Change50.20%Easy
859Buddy Strings27.60%Easy
858Mirror Reflection52.00%Medium
857Minimum Cost to Hire K Workers47.30%Hard
856Score of Parentheses55.90%Medium
855Exam Room38.10%Medium
854K-Similar Strings33.20%Hard
853Car Fleet39.30%Medium
852Peak Index in a Mountain Array68.50%Easy
851Loud and Rich47.40%Medium
850Rectangle Area II44.00%Hard
849Maximize Distance to Closest Person40.40%Easy
848Shifting Letters39.90%Medium
847Shortest Path Visiting All Nodes45.90%Hard
846Hand of Straights48.60%Medium
845Longest Mountain in Array34.00%Medium
844Backspace String Compare45.50%Easy
843Guess the Word42.60%Hard
842Split Array into Fibonacci Sequence34.60%Medium
841Keys and Rooms59.70%Medium
840Magic Squares In Grid35.10%Easy
839Similar String Groups33.50%Hard
838Push Dominoes42.80%Medium
837New 21 Game29.50%Medium
836Rectangle Overlap45.50%Easy
835Image Overlap50.30%Medium
834Sum of Distances in Tree38.10%Hard
833Find And Replace in String44.50%Medium
832Flipping an Image71.30%Easy
831Masking Personal Information41.50%Medium
830Positions of Large Groups47.40%Easy
829Consecutive Numbers Sum32.10%Hard
828Unique Letter String38.10%Hard
827Making A Large Island42.10%Hard
826Most Profit Assigning Work34.70%Medium
825Friends Of Appropriate Ages35.00%Medium
824Goat Latin56.70%Easy
823Binary Trees With Factors31.50%Medium
822Card Flipping Game39.70%Medium
821Shortest Distance to a Character62.60%Easy
820Short Encoding of Words46.00%Medium
819Most Common Word41.50%Easy
818Race Car34.00%Hard
817Linked List Components51.90%Medium
816Ambiguous Coordinates42.40%Medium
815Bus Routes36.10%Hard
814Binary Tree Pruning68.30%Medium
813Largest Sum of Averages42.40%Medium
812Largest Triangle Area53.80%Easy
811Subdomain Visit Count61.50%Easy
810Chalkboard XOR Game41.90%Hard
809Expressive Words39.50%Medium
808Soup Servings33.60%Medium
807Max Increase to Keep City Skyline79.60%Medium
806Number of Lines To Write String62.10%Easy
805Split Array With Same Average21.00%Hard
804Unique Morse Code Words71.30%Easy
803Bricks Falling When Hit22.90%Hard
802Find Eventual Safe States39.20%Medium
801Minimum Swaps To Make Sequences Increasing31.00%Medium
800Similar RGB Color $54.50%Easy
799Champagne Tower29.90%Medium
798Smallest Rotation with Highest Score34.30%Hard
797All Paths From Source to Target67.40%Medium
796Rotate String49.60%Easy
795Number of Subarrays with Bounded Maximum41.60%Medium
794Valid Tic-Tac-Toe State27.80%Medium
793Preimage Size of Factorial Zeroes Function40.80%Hard
792Number of Matching Subsequences37.30%Medium
791Custom Sort String59.40%Medium
790Domino and Tromino Tiling32.80%Medium
789Escape The Ghosts51.00%Medium
788Rotated Digits51.00%Easy
787Cheapest Flights Within K Stops29.90%Medium
786K-th Smallest Prime Fraction32.50%Hard
785Is Graph Bipartite38.50%Medium
784Letter Case Permutation53.00%Easy
783Minimum Distance Between BST Nodes47.80%Easy
782Transform to Chessboard37.50%Hard
781Rabbits in Forest49.80%Medium
780Reaching Points23.90%Hard
779K-th Symbol in Grammar37.30%Medium
778Swim in Rising Water44.60%Hard
777Swap Adjacent in LR String28.90%Medium
776Split BST $49.90%Medium
775Global and Local Inversions33.60%Medium
774Minimize Max Distance to Gas Station $32.80%Hard
773Sliding Puzzle46.50%Hard
772Basic Calculator III $40.10%Hard
771Jewels and Stones81.90%Easy
770Basic Calculator IV42.10%Hard
769Max Chunks To Make Sorted48.00%Medium
768Max Chunks To Make Sorted II43.20%Hard
767Reorganize String36.50%Medium
766Toeplitz Matrix57.90%Easy
765Couples Holding Hands48.50%Hard
764Largest Plus Sign39.20%Medium
763Partition Labels64.10%Medium
762Prime Number of Set Bits in Binary Representation55.00%Easy
761Special Binary String41.00%Hard
760Find Anagram Mappings $75.60%Easy
759Employee Free Time $51.90%Hard
758Bold Words in String $37.90%Easy
757Set Intersection Size At Least Two34.60%Hard
756Pyramid Transition Matrix45.50%Medium
755Pour Water $34.00%Medium
754Reach a Number26.10%Medium
753Cracking the Safe39.70%Hard
752Open the Lock38.20%Medium
751IP to CIDR $54.80%Easy
750Number Of Corner Rectangles $51.00%Medium
749Contain Virus39.60%Hard
748Shortest Completing Word53.50%Medium
747Largest Number At Least Twice of Others42.60%Easy
746Min Cost Climbing Stairs43.60%Easy
745Prefix and Suffix Search24.50%Hard
744Find Smallest Letter Greater Than Target45.30%Easy
743Network Delay Time34.30%Medium
742Closest Leaf in a Binary Tree $33.20%Medium
741Cherry Pickup22.50%Hard
740Delete and Earn42.60%Medium
739Daily Temperatures53.50%Medium
738Monotone Increasing Digits41.80%Medium
737Sentence Similarity II $41.20%Medium
736Parse Lisp Expression42.00%Hard
735Asteroid Collision37.60%Medium
734Sentence Similarity $38.60%Easy
733Flood Fill49.30%Easy
732My Calendar III51.30%Hard
731My Calendar II35.00%Medium
730Count Different Palindromic Subsequences32.40%Hard
729My Calendar I40.10%Medium
728Self Dividing Numbers68.50%Easy
727Minimum Window Subsequence30.10%Hard
726Number of Atoms45.00%Hard
725Split Linked List in Parts50.00%Medium
724Find Pivot Index41.00%Easy
723Candy Crush $56.10%Medium
722Remove Comments26.30%Medium
721Accounts Merge29.60%Medium
720Longest Word in Dictionary40.60%Easy
719Find K-th Smallest Pair Distance26.10%Hard
718Maximum Length of Repeated Subarray39.90%Medium
7171-bit and 2-bit Characters50.90%Easy
716Max Stack $35.50%Hard
715Range Module31.00%Hard
714Best Time to Buy and Sell Stock with Transaction Fee41.60%Medium
713Subarray Product Less Than K32.90%Medium
712Minimum ASCII Delete Sum for Two Strings50.90%Medium
711Number of Distinct Islands II $39.40%Hard
710Random Pick with Blacklist29.80%Hard
709To Lower Case74.50%Easy
708Insert into a Cyclic Sorted List $25.50%Medium
707Design Linked List19.10%Easy
706Design HashMap49.10%Easy
705Design HashSet43.60%Easy
704Binary Search40.10%Easy
703Kth Largest Element in a Stream39.60%Easy
702Search in a Sorted Array of Unknown Size43.00%Medium
701Insert into a Binary Search Tree67.90%Medium
700Search in a Binary Search Tree62.70%Easy
699Falling Squares36.80%Hard
698Partition to K Equal Sum Subsets35.60%Medium
697Degree of an Array47.90%Easy
696Count Binary Substrings51.90%Easy
695Max Area of Island53.30%Easy
694Number of Distinct Islands $43.90%Medium
693Binary Number with Alternating Bits54.20%Easy
692Top K Frequent Words41.70%Medium
691Stickers to Spell Word32.30%Hard
690Employee Importance53.60%Easy
689Maximum Sum of 3 Non-Overlapping Subarrays41.70%Hard
688Knight Probability in Chessboard38.90%Medium
687Longest Univalue Path32.90%Easy
686Repeated String Match31.70%Easy
685Redundant Connection II28.40%Hard
684Redundant Connection37.40%Medium
683K Empty Slots37.00%Hard
682Baseball Game58.60%Easy
681Next Closest Time $43.00%Medium
680Valid Palindrome II31.10%Easy
67924 Game38.30%Hard
678Valid Parenthesis String28.30%Medium
677Map Sum Pairs53.80%Medium
676Implement Magic Dictionary50.70%Medium
675Cut Off Trees for Golf Event27.20%Hard
674Longest Continuous Increasing Subsequence43.20%Easy
673Number of Longest Increasing Subsequence30.80%Medium
672Bulb Switcher II47.60%Medium
671Second Minimum Node In a Binary Tree42.30%Easy
670Maximum Swap38.40%Medium
669Trim a Binary Search Tree58.70%Easy
668Kth Smallest Number in Multiplication Table36.30%Hard
667Beautiful Arrangement II51.50%Medium
666Path Sum IV $48.90%Medium
665Non-decreasing Array21.20%Easy
664Strange Printer31.10%Hard
663Equal Tree Partition $36.70%Medium
662Maximum Width of Binary Tree37.00%Medium
661Image Smoother46.60%Easy
660Remove 9 $46.10%Hard
659Split Array into Consecutive Subsequences39.40%Medium
658Find K Closest Elements36.30%Medium
657Judge Route Circle69.30%Easy
656Coin Path $24.60%Hard
655Print Binary Tree50.80%Medium
654Maximum Binary Tree70.80%Medium
653Two Sum IV - Input is a BST50.60%Easy
652Find Duplicate Subtrees33.20%Medium
6514 Keys Keyboard $46.70%Medium
6502 Keys Keyboard42.70%Medium
649Dota2 Senate35.60%Medium
648Replace Words48.40%Medium
647Palindromic Substrings55.70%Medium
646Maximum Length of Pair Chain47.40%Medium
645Set Mismatch40.40%Easy
644Maximum Average Subarray II $20.30%Hard
643Maximum Average Subarray I38.40%Easy
642Design Search Autocomplete System $29.40%Hard
641Design Circular Deque48.00%Medium
640Solve the Equation39.00%Medium
639Decode Ways II22.80%Hard
638Shopping Offers41.50%Medium
637Average of Levels in Binary Tree55.60%Easy
636Exclusive Time of Functions40.30%Medium
635Design Log Storage System $47.70%Medium
634Find the Derangement of An Array $32.70%Medium
633Sum of Square Numbers31.60%Easy
632Smallest Range42.80%Hard
631Design Excel Sum Formula $25.60%Hard
630Course Schedule III20.50%Medium
629K Inverse Pairs Array23.90%Hard
628Maximum Product of Three Numbers45.40%Easy
627Swap Salary67.40%Easy
626Exchange Seats49.60%Medium
625Minimum Factorization29.50%Medium
624Maximum Distance in Arrays $32.70%Easy
623Add One Row to Tree48.70%Medium
622Design Circular Queue36.60%Medium
621Task Scheduler41.40%Medium
620Not Boring Movies59.80%Easy
619Biggest Single Number $36.60%Easy
618Students Report By Geography $40.40%Hard
617Merge Two Binary Trees69.60%Easy
616Add Bold Tag in String $37.30%Medium
615Average Salary: Departments VS Company $33.00%Hard
614Second Degree Follower $22.70%Medium
613Shortest Distance in a Line $70.60%Easy
612Shortest Distance in a Plane $51.00%Medium
611Valid Triangle Number38.90%Medium
610Triangle Judgement $59.10%Easy
609Find Duplicate File in System52.50%Medium
608Tree Node $54.60%Medium
607Sales Person $51.10%Easy
606Construct String from Binary Tree51.80%Easy
605Can Place Flowers30.00%Easy
604Design Compressed String Iterator $31.60%Easy
603Consecutive Available Seats $54.50%Easy
602Friend Requests II: Who Has the Most Friends $42.50%Medium
601Human Traffic of Stadium33.80%Hard
600Non-negative Integers without Consecutive Ones27.40%Hard
599Minimum Index Sum of Two Lists48.00%Easy
598Range Addition II48.30%Easy
597Friend Requests I: Overall Acceptance Rate $38.40%Easy
596Classes More Than 5 Students33.40%Easy
595Big Countries72.00%Easy
594Longest Harmonious Subsequence40.00%Easy
593Valid Square39.20%Medium
592Fraction Addition and Subtraction47.00%Medium
591Tag Validator26.40%Hard
590N-ary Tree Postorder Traversal63.00%Easy
589N-ary Tree Preorder Traversal63.10%Easy
588Design In-Memory File System $32.40%Hard
587Erect the Fence29.90%Hard
586Customer Placing the Largest Number of Orders $62.50%Easy
585Investments in 2016 $44.60%Medium
584Find Customer Referee $63.60%Easy
583Delete Operation for Two Strings44.00%Medium
582Kill Process $47.70%Medium
581Shortest Unsorted Continuous Subarray30.10%Easy
580Count Student Number in Departments $40.00%Medium
579Find Cumulative Salary of an Employee $30.90%Hard
578Get Highest Answer Rate Question $33.10%Medium
577Employee Bonus $53.80%Easy
576Out of Boundary Paths33.10%Medium
575Distribute Candies59.50%Easy
574Winning Candidate $34.50%Medium
573Squirrel Simulation $51.00%Medium
572Subtree of Another Tree41.00%Easy
571Find Median Given Frequency of Numbers $44.90%Hard
570Managers with at Least 5 Direct Reports $59.00%Medium
569Median Employee Salary $41.60%Hard
568Maximum Vacation Days $39.90%Hard
567Permutation in String36.30%Medium
566Reshape the Matrix59.80%Easy
565Array Nesting50.00%Medium
564Find the Closest Palindrome16.60%Hard
563Binary Tree Tilt47.00%Easy
562Longest Line of Consecutive One in Matrix $38.80%Medium
561Array Partition I69.80%Easy
560Subarray Sum Equals K41.80%Medium
559Maximum Depth of N-ary Tree62.10%Easy
558Quad Tree Intersection36.40%Easy
557Reverse Words in a String III61.20%Easy
556Next Greater Element III27.70%Medium
555Split Concatenated Strings $30.00%Medium
554Brick Wall42.70%Medium
553Optimal Division55.20%Medium
552Student Attendance Record II28.50%Hard
551Student Attendance Record I43.90%Easy
549Binary Tree Longest Consecutive Sequence II $38.10%Medium
548Split Array with Equal Sum $30.80%Medium
547Friend Circles49.00%Medium
546Remove Boxes29.60%Hard
545Boundary of Binary Tree $29.10%Medium
544Output Contest Matches $73.20%Medium
543Diameter of Binary Tree42.70%Easy
54201 Matrix32.50%Medium
541Reverse String II44.40%Easy
540Single Element in a Sorted Array55.90%Medium
539Minimum Time Difference44.70%Medium
538Convert BST to Greater Tree52.70%Medium
537Complex Number Multiplication65.90%Medium
536Construct Binary Tree from String $36.30%Medium
535Encode and Decode TinyURL76.10%Medium
534Game Play Analysis III67.10%Medium
533Lonely Pixel II $38.90%Medium
532K-diff Pairs in an Array27.20%Easy
531Lonely Pixel I $50.20%Medium
530Minimum Absolute Difference in BST48.00%Easy
529Minesweeper52.00%Medium
528Random Pick with Weight41.80%Medium
527Word Abbreviation $33.90%Hard
526Beautiful Arrangement53.50%Medium
525Contiguous Array34.40%Medium
524Longest Word in Dictionary through Deleting40.20%Medium
523Continuous Subarray Sum21.30%Medium
522Longest Uncommon Subsequence II28.10%Medium
521Longest Uncommon Subsequence I50.70%Easy
520Detect Capital54.20%Easy
519Random Flip Matrix32.20%Medium
518Coin Change 233.20%Medium
517Super Washing Machines34.60%Hard
516Longest Palindromic Subsequence42.00%Medium
515Find Largest Value in Each Tree Row52.70%Medium
514Freedom Trail27.20%Hard
513Find Bottom Left Tree Value55.60%Medium
510Inorder Successor in BST II $56.20%Medium
509Fibonacci Number66.40%Easy
508Most Frequent Subtree Sum52.00%Medium
507Perfect Number32.70%Easy
506Relative Ranks48.50%Easy
505The Maze II34.80%Medium
504Base 746.40%Easy
503Next Greater Element II46.20%Medium
502IPO32.40%Hard
501Find Mode in Binary Search Tree39.40%Easy
500Keyboard Row60.20%Easy
499The Maze III32.00%Hard
498Diagonal Traverse46.20%Medium
497Random Point in Non-overlapping Rectangles33.20%Medium
496Next Greater Element I58.80%Easy
495Teemo Attacking51.90%Medium
494Target Sum44.40%Medium
493Reverse Pairs17.10%Hard
492Construct the Rectangle49.70%Easy
491Increasing Subsequences39.30%Medium
490The Maze42.80%Medium
489Robot Room Cleaner57.10%Hard
488Zuma Game38.00%Hard
487Max Consecutive Ones II $42.70%Medium
486Predict the Winner43.60%Medium
485Max Consecutive Ones55.30%Easy
484Find Permutation $50.50%Medium
483Smallest Good Base30.60%Hard
482License Key Formatting41.20%Medium
481Magical String46.20%Medium
480Sliding Window Median31.00%Hard
479Largest Palindrome Product23.90%Easy
478Generate Random Point in a Circle33.80%Medium
477Total Hamming Distance44.10%Medium
476Number Complement61.20%Easy
475Heaters30.20%Easy
474Ones and Zeroes34.90%Medium
473Matchsticks to Square31.80%Medium
472Concatenated Words29.20%Hard
471Encode String with Shortest Length $43.50%Hard
470Implement Rand10() Using Rand7()43.00%Medium
469Convex Polygon $27.20%Medium
468Validate IP Address22.10%Medium
467Unique Substrings in Wraparound String29.90%Medium
466Count The Repetitions24.20%Hard
465Optimal Account Balancing $29.20%Hard
464Can I Win22.20%Medium
463Island Perimeter56.70%Easy
462Minimum Moves to Equal Array Elements II50.90%Medium
461Hamming Distance73.20%Easy
460LFU Cache18.30%Hard
459Repeated Substring Pattern39.70%Easy
458Poor Pigs40.70%Easy
457Circular Array Loop20.60%Medium
456132 Pattern28.00%Medium
455Assign Cookies48.10%Easy
4544Sum II42.80%Medium
453Minimum Moves to Equal Array Elements46.30%Easy
452Minimum Number of Arrows to Burst Balloons42.10%Medium
451Sort Characters By Frequency50.90%Medium
450Delete Node in a BST34.50%Medium
449Serialize and Deserialize BST41.20%Medium
448Find All Numbers Disappeared in an Array58.30%Easy
447Number of Boomerangs42.20%Easy
446Arithmetic Slices II - Subsequence22.30%Hard
445Add Two Numbers II45.40%Medium
444Sequence Reconstruction $20.50%Medium
443String Compression35.80%Easy
442Find All Duplicates in an Array46.40%Medium
441Arranging Coins36.20%Easy
440K-th Smallest in Lexicographical Order21.50%Hard
439Ternary Expression Parser $49.40%Medium
438Find All Anagrams in a String33.50%Easy
437Path Sum III38.60%Easy
436Find Right Interval42.30%Medium
435Non-overlapping Intervals39.80%Medium
434Number of Segments in a String38.40%Easy
433Minimum Genetic Mutation33.50%Medium
432All O`one Data Structure28.30%Hard
431Encode N-ary Tree to Binary Tree $53.70%Hard
430Flatten a Multilevel Doubly Linked List36.20%Medium
429N-ary Tree Level Order Traversal55.80%Easy
428Serialize and Deserialize N-ary Tree $48.10%Hard
427Construct Quad Tree49.20%Easy
426Convert Binary Search Tree to Sorted Doubly Linked List43.30%Medium
425Word Squares $40.10%Hard
424Longest Repeating Character Replacement38.10%Medium
423Reconstruct Original Digits from English40.80%Medium
422Valid Word Square $36.40%Easy
421Maximum XOR of Two Numbers in an Array36.40%Medium
420Strong Password Checker22.10%Hard
419Battleships in a Board59.30%Medium
418Sentence Screen Fitting $25.10%Medium
417Pacific Atlantic Water Flow31.10%Medium
416Partition Equal Subset Sum36.80%Medium
415Add Strings41.50%Easy
414Third Maximum Number26.50%Easy
413Arithmetic Slices53.50%Medium
412Fizz Buzz57.50%Easy
411Minimum Unique Word Abbreviation $25.60%Hard
410Split Array Largest Sum25.00%Hard
409Longest Palindrome44.90%Easy
408Valid Word Abbreviation $26.20%Easy
407Trapping Rain Water II33.10%Hard
406Queue Reconstruction by Height54.10%Medium
405Convert a Number to Hexadecimal41.80%Easy
404Sum of Left Leaves46.20%Easy
403Frog Jump31.70%Hard
402Remove K Digits25.90%Medium
401Binary Watch43.00%Easy
400Nth Digit30.70%Easy
399Evaluate Division34.60%Medium
398Random Pick Index30.40%Medium
397Integer Replacement25.90%Easy
396Rotate Function28.40%Easy
395Longest Substring with At Least K Repeating Characters32.50%Medium
394Decode String38.60%Medium
393UTF-8 Validation33.00%Medium
392Is Subsequence44.10%Medium
391Perfect Rectangle13.30%Hard
390Elimination Game12.50%Medium
389Find the Difference49.90%Easy
388Longest Absolute File Path28.30%Medium
387First Unique Character in a String43.10%Easy
386Lexicographical Numbers31.00%Medium
385Mini Parser26.90%Medium
384Shuffle an Array45.50%Medium
383Ransom Note44.60%Easy
382Linked List Random Node48.60%Medium
381Insert Delete GetRandom O(1) - Duplicates allowed30.90%Hard
380Insert Delete GetRandom O(1)33.80%Medium
379Design Phone Directory $25.80%Medium
378Kth Smallest Element in a Sorted Matrix40.20%Medium
377Combination Sum IV37.50%Medium
376Wiggle Subsequence35.80%Medium
375Guess Number Higher or Lower II28.30%Medium
374Guess Number Higher or Lower31.70%Easy
373Find K Pairs with Smallest Sums25.50%Medium
372Super Pow30.10%Medium
371Sum of Two Integers54.00%Easy
370Range Addition $49.90%Medium
369Plus One Linked List $50.10%Medium
368Largest Divisible Subset32.00%Medium
367Valid Perfect Square36.60%Medium
366Find Leaves of Binary Tree $53.60%Medium
365Water and Jug Problem20.10%Medium
364Nested List Weight Sum II $47.20%Medium
363Max Sum of Rectangle No Larger Than K27.00%Hard
362Design Hit Counter $48.30%Medium
361Bomb Enemy $32.60%Medium
360Sort Transformed Array $40.80%Medium
359Logger Rate Limiter $56.00%Easy
358Rearrange String k Distance Apart $26.90%Hard
357Count Numbers with Unique Digits42.50%Medium
356Line Reflection $28.70%Medium
355Design Twitter22.20%Medium
354Russian Doll Envelopes27.10%Hard
353Design Snake Game $19.80%Medium
352Data Stream as Disjoint Intervals34.40%Hard
351Android Unlock Patterns $32.00%Medium
350Intersection of Two Arrays II41.50%Easy
349Intersection of Two Arrays47.80%Easy
348Design Tic-Tac-Toe $45.60%Medium
347Top K Frequent Elements44.50%Medium
346Moving Average from Data Stream $69.20%Easy
345Reverse Vowels of a String35.30%Easy
344Reverse String58.90%Easy
343Integer Break43.60%Medium
342Power of Four34.10%Easy
341Flatten Nested List Iterator $18.70%Medium
340Longest Substring with At Most K Distinct Characters $36.30%Hard
339Nested List Weight Sum $54.60%Easy
338Counting Bits55.40%Medium
337House Robber III37.00%Medium
336Palindrome Pairs18.70%Hard
335Self Crossing18.00%Medium
334Increasing Triplet Subsequence33.20%Medium
333Largest BST Subtree $26.50%Medium
332Reconstruct Itinerary23.40%Medium
331Verify Preorder Serialization of a Binary Tree31.50%Medium
330Patching Array28.80%Medium
329Longest Increasing Path in a Matrix29.50%Medium
328Odd Even Linked List37.80%Easy
327Count of Range Sum24.30%Hard
326Power of Three35.30%Easy
325Maximum Size Subarray Sum Equals k $39.60%Easy
324Wiggle Sort II20.10%Medium
323Number of Connected Components in an Undirected Graph $43.30%Medium
322Coin Change24.90%Medium
321Create Maximum Number19.10%Hard
320Generalized Abbreviation $40.40%Medium
319Bulb Switcher39.20%Medium
318Maximum Product of Word Lengths38.70%Medium
317Shortest Distance from All Buildings $29.10%Hard
316Remove Duplicate Letters23.00%Medium
315Count of Smaller Numbers After Self28.20%Hard
314Binary Tree Vertical Order Traversal $30.10%Medium
313Super Ugly Number31.20%Medium
312Burst Balloons24.50%Medium
311Sparse Matrix Multiplication $40.00%Medium
310Minimum Height Trees20.20%Medium
309Best Time to Buy and Sell Stock with Cooldown32.60%Medium
308Range Sum Query 2D - Mutable $20.30%Hard
307Range Sum Query - Mutable14.50%Medium
306Additive Number23.30%Medium
305Number of Islands II $26.70%Hard
304Range Sum Query 2D - Immutable21.50%Medium
303Range Sum Query - Immutable25.70%Easy
302Smallest Rectangle Enclosing Black Pixels $36.70%Hard
301Remove Invalid Parentheses27.00%Hard
300Longest Increasing Subsequence31.50%Medium
299Bulls and Cows23.80%Easy
298Binary Tree Longest Consecutive Sequence $32.20%Medium
297Serialize and Deserialize Binary Tree23.80%Medium
296Best Meeting Point $41.40%Hard
295Find Median from Data Stream18.60%Hard
294Flip Game II $38.10%Medium
293Flip Game $47.60%Easy
292Nim Game49.50%Easy
291Word Pattern II $31.50%Hard
290Word Pattern26.50%Easy
289Game of Life32.60%Medium
288Unique Word Abbreviation $16.80%Easy
287Find the Duplicate Number32.80%Hard
286Walls and Gates $29.90%Medium
285Inorder Successor in BST $32.50%Medium
284Peeking Iterator31.00%Medium
283Move Zeroes41.40%Easy
282Expression Add Operators18.90%Hard
281Zigzag Iterator $37.20%Medium
280Wiggle Sort $43.30%Medium
279Perfect Squares28.80%Medium
278First Bad Version19.80%Easy
277Find the Celebrity $31.70%Medium
276Paint Fence $25.00%Easy
275H-Index II31.40%Medium
274H-Index25.30%Medium
273Integer to English Words15.50%Medium
272Closest Binary Search Tree Value II $26.90%Hard
271Encode and Decode Strings $25.40%Medium
270Closest Binary Search Tree Value $29.40%Easy
269Alien Dictionary $16.50%Hard
268Missing Number34.70%Medium
267Palindrome Permutation II $22.50%Medium
266Palindrome Permutation $45.80%Easy
265Paint House II $30.00%Hard
264Ugly Number II21.60%Medium
263Ugly Number32.60%Easy
262Trips and Users *16.10%Hard
261Graph Valid Tree $25.40%Medium
260Single Number III37.60%Medium
2593Sum Smaller $34.20%Medium
258Add Digits46.50%Easy
257Binary Tree Paths21.90%Easy
256Paint House $38.40%Medium
255Verify Preorder Sequence in Binary Search Tree $32.30%Medium
254Factor Combinations $29.00%Medium
253Meeting Rooms II $28.80%Medium
252Meeting Rooms $35.40%Easy
251Flatten 2D Vector $28.30%Medium
250Count Univalue Subtrees $32.70%Medium
249Group Shifted Strings $25.20%Easy
248Strobogrammatic Number III $21.80%Hard
247Strobogrammatic Number II $26.70%Medium
246Strobogrammatic Number $31.60%Easy
245Shortest Word Distance III $43.20%Medium
244Shortest Word Distance II $33.70%Medium
243Shortest Word Distance $41.80%Easy
242Valid Anagram39.30%Easy
241Different Ways to Add Parentheses27.10%Medium
240Search a 2D Matrix II31.40%Medium
239Sliding Window Maximum24.30%Hard
238Product of Array Except Self42.40%Medium
237Delete Node in a Linked List50.90%Easy
236Lowest Common Ancestor of a Binary Tree28.30%Medium
235Lowest Common Ancestor of a Binary Search Tree38.90%Medium
234Palindrome Linked List23.80%Easy
233Number of Digit One16.10%Medium
232Implement Queue using Stacks37.40%Easy
231Power of Two31.30%Easy
230Kth Smallest Element in a BST30.50%Medium
229Majority Element II30.50%Medium
228Summary Ranges21.10%Easy
227Basic Calculator II18.00%Medium
226Invert Binary Tree35.40%Easy
225Implement Stack using Queues29.60%Medium
224Basic Calculator15.80%Medium
223Rectangle Area25.60%Easy
222Count Complete Tree Nodes19.40%Medium
221Maximal Square20.30%Medium
220Contains Duplicate III15.30%Medium
219Contains Duplicate II25.60%Easy
218The Skyline Problem16.20%Hard
217Contains Duplicate35.90%Easy
216Combination Sum III27.70%Medium
215Kth Largest Element in an Array27.30%Medium
214Shortest Palindrome16.80%Hard
213House Robber II26.30%Medium
212Word Search II15.00%Hard
211Add and Search Word - Data structure design20.70%Medium
210Course Schedule II19.30%Medium
209Minimum Size Subarray Sum22.90%Medium
208Implement Trie (Prefix Tree)24.80%Medium
207Course Schedule21.70%Medium
206Reverse Linked List31.50%Easy
205Isomorphic Strings24.20%Easy
204Count Primes19.00%Easy
203Remove Linked List Elements25.80%Easy
202Happy Number31.40%Easy
201Bitwise AND of Numbers Range23.30%Medium
200Number of Islands21.90%Medium
199Binary Tree Right Side View27.10%Medium
198House Robber28.80%Easy
197Rising Temperature *25.90%Easy
196Delete Duplicate Emails *19.00%Easy
195Tenth Line #32.20%Easy
194Transpose File #21.40%Medium
193Valid Phone Numbers #24.40%Easy
192Word Frequency #26.10%Medium
191Number of 1 Bits37.30%Easy
190Reverse Bits28.40%Easy
189Rotate Array17.80%Easy
188Best Time to Buy and Sell Stock IV17.30%Hard
187Repeated DNA Sequences19.50%Medium
186Reverse Words in a String II $31.10%Medium
185Department Top Three Salaries *15.20%Hard
184Department Highest Salary *19.00%Medium
183Customers Who Never Order *33.70%Easy
182Duplicate Emails *38.10%Easy
181Employees Earning More Than Their Managers *41.00%Easy
180Consecutive Numbers *26.60%Medium
179Largest Number15.70%Medium
178Rank Scores *24.60%Medium
177Nth Highest Salary *16.30%Medium
176Second Highest Salary *25.00%Easy
175Combine Two Tables *34.40%Easy
174Dungeon Game17.70%Hard
173Binary Search Tree Iterator29.30%Medium
172Factorial Trailing Zeroes28.40%Easy
171Excel Sheet Column Number36.50%Easy
170Two Sum III - Data structure design $24.70%Easy
169Majority Element35.00%Easy
168Excel Sheet Column Title18.10%Easy
167Two Sum II - Input array is sorted $43.30%Medium
166Fraction to Recurring Decimal12.70%Medium
165Compare Version Numbers15.20%Easy
164Maximum Gap24.40%Hard
163Missing Ranges $24.10%Medium
162Find Peak Element31.50%Medium
161One Edit Distance $24.00%Medium
160Intersection of Two Linked Lists28.70%Easy
159Longest Substring with At Most Two Distinct Characters $30.20%Hard
158Read N Characters Given Read4 II - Call multiple times $22.30%Hard
157Read N Characters Given Read4 $29.80%Easy
156Binary Tree Upside Down $34.30%Medium
155Min Stack18.50%Easy
154Find Minimum in Rotated Sorted Array II31.90%Hard
153Find Minimum in Rotated Sorted Array33.30%Medium
152Maximum Product Subarray19.40%Medium
151Reverse Words in a String15.10%Medium
150Evaluate Reverse Polish Notation21.10%Medium
149Max Points on a Line12.60%Hard
148Sort List22.00%Medium
147Insertion Sort List26.40%Medium
146LRU Cache15.00%Hard
145Binary Tree Postorder Traversal32.40%Hard
144Binary Tree Preorder Traversal36.30%Medium
143Reorder List21.00%Medium
142Linked List Cycle II31.40%Medium
141Linked List Cycle36.30%Medium
140Word Break II17.70%Hard
139Word Break23.00%Medium
138Copy List with Random Pointer25.10%Hard
137Single Number II35.00%Medium
136Single Number45.10%Medium
135Candy20.50%Hard
134Gas Station25.70%Medium
133Clone Graph24.00%Medium
132Palindrome Partitioning II19.70%Hard
131Palindrome Partitioning26.70%Medium
130Surrounded Regions14.60%Medium
129Sum Root to Leaf Numbers30.30%Medium
128Longest Consecutive Sequence29.40%Hard
127Word Ladder19.30%Medium
126Word Ladder II12.90%Hard
125Valid Palindrome22.00%Easy
124Binary Tree Maximum Path Sum21.50%Hard
123Best Time to Buy and Sell Stock III23.90%Hard
122Best Time to Buy and Sell Stock II38.30%Medium
121Best Time to Buy and Sell Stock32.60%Medium
120Triangle27.40%Medium
119Pascal's Triangle II29.40%Easy
118Pascal's Triangle30.10%Easy
117Populating Next Right Pointers in Each Node II32.00%Hard
116Populating Next Right Pointers in Each Node36.20%Medium
115Distinct Subsequences26.30%Hard
114Flatten Binary Tree to Linked List28.80%Medium
113Path Sum II26.60%Medium
112Path Sum29.80%Easy
111Minimum Depth of Binary Tree29.10%Easy
110Balanced Binary Tree32.00%Easy
109Convert Sorted List to Binary Search Tree27.90%Medium
108Convert Sorted Array to Binary Search Tree34.00%Medium
107Binary Tree Level Order Traversal II31.10%Easy
106Construct Binary Tree from Inorder and Postorder Traversal26.80%Medium
105Construct Binary Tree from Preorder and Inorder Traversal26.40%Medium
104Maximum Depth of Binary Tree45.10%Easy
103Binary Tree Zigzag Level Order Traversal26.40%Medium
102Binary Tree Level Order Traversal29.30%Easy
101Symmetric Tree31.60%Easy
100Same Tree41.80%Easy
99Recover Binary Search Tree24.30%Hard
98Validate Binary Search Tree20.60%Medium
97Interleaving String20.80%Hard
96Unique Binary Search Trees36.00%Medium
95Unique Binary Search Trees II28.00%Medium
94Binary Tree Inorder Traversal36.20%Medium
93Restore IP Addresses21.00%Medium
92Reverse Linked List II26.10%Medium
91Decode Ways16.40%Medium
90Subsets II27.70%Medium
89Gray Code32.80%Medium
88Merge Sorted Array29.70%Easy
87Scramble String24.20%Hard
86Partition List27.50%Medium
85Maximal Rectangle22.00%Hard
84Largest Rectangle in Histogram22.60%Hard
83Remove Duplicates from Sorted List34.50%Easy
82Remove Duplicates from Sorted List II25.00%Medium
81Search in Rotated Sorted Array II31.40%Medium
80Remove Duplicates from Sorted Array II30.50%Medium
79Word Search20.30%Medium
78Subsets28.20%Medium
77Combinations30.90%Medium
76Minimum Window Substring18.90%Hard
75Sort Colors32.60%Medium
74Search a 2D Matrix31.60%Medium
73Set Matrix Zeroes31.40%Medium
72Edit Distance26.20%Hard
71Simplify Path20.00%Medium
70Climbing Stairs34.40%Easy
69Sqrt(x)23.10%Medium
68Text Justification14.60%Hard
67Add Binary24.70%Easy
66Plus One30.40%Easy
65Valid Number11.40%Hard
64Minimum Path Sum32.20%Medium
63Unique Paths II28.00%Medium
62Unique Paths32.80%Medium
61Rotate List21.70%Medium
60Permutation Sequence22.80%Medium
59Spiral Matrix II31.80%Medium
58Length of Last Word28.00%Easy
57Insert Interval21.40%Hard
56Merge Intervals22.40%Hard
55Jump Game27.00%Medium
54Spiral Matrix20.80%Medium
53Maximum Subarray34.50%Medium
52N-Queens II35.80%Hard
51N-Queens26.50%Hard
50Pow(x, n)26.70%
49Anagrams24.30%Medium
48Rotate Image31.90%Medium
47Permutations II25.80%Hard
46Permutations31.90%Medium
45Jump Game II24.20%Hard
44Wildcard Matching15.00%Hard
43Multiply Strings21.00%Medium
42Trapping Rain Water30.00%Hard
41First Missing Positive22.90%Hard
40Combination Sum II25.20%Medium
39Combination Sum27.90%Medium
38Count and Say25.20%Easy
37Sudoku Solver21.80%Hard
36Valid Sudoku27.20%Easy
35Search Insert Position35.40%Medium
34Search for a Range27.50%Medium
33Search in Rotated Sorted Array28.80%Hard
32Longest Valid Parentheses20.90%Hard
31Next Permutation25.00%Medium
30Substring with Concatenation of All Words19.40%Hard
29Divide Two Integers15.00%Medium
28Implement strStr()22.20%Easy
27Remove Element32.10%Easy
26Remove Duplicates from Sorted Array31.30%Easy
25Reverse Nodes in k-Group25.50%Hard
24Swap Nodes in Pairs32.50%Medium
23Merge k Sorted Lists21.10%Hard
22Generate Parentheses32.60%Medium
21Merge Two Sorted Lists32.70%Easy
20Valid Parentheses26.50%Easy
19Remove Nth Node From End of List27.10%Easy
184Sum21.70%Medium
17Letter Combinations of a Phone Number25.80%Medium
163Sum Closest26.90%Medium
153Sum16.90%Medium
14Longest Common Prefix25.50%Easy
13Roman to Integer34.00%Easy
12Integer to Roman33.80%Medium
11Container With Most Water32.00%Medium
10Regular Expression Matching20.70%Hard
9Palindrome Number28.30%Easy
8String to Integer (atoi)13.00%Easy
7Reverse Integer25.10%Easy
6ZigZag Conversion21.80%Easy
5Longest Palindromic Substring20.70%Medium
4Median of Two Sorted Arrays17.40%Hard
3Longest Substring Without Repeating Characters20.60%Medium
2Add Two Numbers21.10%Medium
1Two Sum17.70%Medium

WeChat Official Subscription Account

Welcome to follow my subscription account on Wechat, I will update the newest updated problem solution and explanation. And also welcome to add me as your wechat friend.



iOS APP - Leetcode Meet Me

This app displays all practical coding problems from leetcode.com, and provids the solutions.


Available on Apple Store:

Not available anymore.


Wechat Reward

If you like this project and want to sponsor the author, you can reward the author using Wechat by scanning the following QR code.


Or you can also sponsor me by scanning the following Venmo QR code.



Special Thanks

Special thanks to @notfresh to help extract the blog content in markdown format from my cnblogs.