Skip to content

💯 Some Leetcode algorithm and data structure answer wrote by Python/Javascript/Go...

License

Notifications You must be signed in to change notification settings

xv-jiaqi/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode

Some Leetcode algorithm and data structure answer wrote by Python/JavaScript ... 💯.

Progress codebeat badge GitHub issues GitHub stars GitHub license

[TOC]

Usage

Initialize the repository:

sh init-hook.sh

bypass the hook:

git commit --no-verify

‼️ Commit rule:

  • Your solution can be placed in the ./answer/ directory, the directory name should be the problem ID;
  • README does not need to be manually modified.

Statistics

Easy Medium Hard

Total

48 48 11

107

👏 Rank:

🥇 JavaScript ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■□□□□□□□□□□□□□□□□□□□□□□□□□□□□□  77/132
🥈     Python ■■■■■■■■■■■■■■■■■■■■■■■■■■□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□  49/132
🥉         Go ■■■□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□   4/132
4️⃣        SQL ■■□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□   2/132

👬 Contributors:

linningmii
linningmii
kkxujq
kkxujq
inJs
inJs
zy445566
zy445566
zh-rocco
zh-rocco
89
contributions
75
contributions
10
contributions
8
contributions
2
contributions

QUESTIONS

ID Title Answer Difficulty
0001 Two Sum Go, Python, JavaScript Easy
0002 Add Two Numbers Python, JavaScript Medium
0003 Longest Substring Without Repeating Characters Python, JavaScript Medium
0004 Median of Two Sorted Arrays Python, JavaScript Hard
0005 Longest Palindromic Substring Python, JavaScript Medium
0006 ZigZag Conversion Python, JavaScript Medium
0007 Reverse Integer Go, Python, JavaScript Easy
0008 String to Integer (atoi) JavaScript Medium
0009 Palindrome Number Go, Python, JavaScript Easy
0010 Regular Expression Matching JavaScript Hard
0011 Container With Most Water Python, JavaScript Medium
0012 Integer to Roman JavaScript Medium
0013 Roman to Integer JavaScript Easy
0014 Longest Common Prefix Python, JavaScript Easy
0015 3Sum JavaScript Medium
0016 3Sum Closest JavaScript Medium
0017 Letter Combinations of a Phone Number JavaScript Medium
0018 4Sum JavaScript Medium
0019 Remove Nth Node From End of List JavaScript Medium
0020 Valid Parentheses JavaScript, Python Easy
0021 Merge Two Sorted Lists JavaScript, Python Easy
0022 Generate Parentheses JavaScript Medium
0023 Merge k Sorted Lists JavaScript Hard
0024 Swap Nodes in Pairs Python, JavaScript Medium
0025 Reverse Nodes in k-Group JavaScript Hard
0026 Remove Duplicates from Sorted Array JavaScript Easy
0027 Remove Element JavaScript Easy
0028 Implement strStr() JavaScript Easy
0029 Divide Two Integers JavaScript Medium
0030 Substring with Concatenation of All Words JavaScript Hard
0031 Next Permutation JavaScript Medium
0032 Longest Valid Parentheses JavaScript Hard
0033 Search in Rotated Sorted Array JavaScript Medium
0034 Find First and Last Position of Element in Sorted Array JavaScript Medium
0035 Search Insert Position JavaScript Easy
0036 Valid Sudoku JavaScript Medium
0037 Sudoku Solver JavaScript Hard
0038 Count and Say Python Easy
0039 Combination Sum Medium
0040 Combination Sum II Medium
0041 First Missing Positive Hard
0042 Trapping Rain Water JavaScript Hard
0043 Multiply Strings Medium
0044 Wildcard Matching Hard
0045 Jump Game II Hard
0046 Permutations JavaScript Medium
0047 Permutations II Medium
0048 Rotate Image Medium
0049 Group Anagrams Medium
0050 Pow(x, n) Medium
0051 N-Queens JavaScript Hard
0052 N-Queens II Hard
0053 Maximum Subarray Python, JavaScript Easy
0054 Spiral Matrix Medium
0055 Jump Game Medium
0056 Merge Intervals Medium
0057 Insert Interval Hard
0058 Length of Last Word JavaScript Easy
0059 Spiral Matrix II Medium
0060 Permutation Sequence Medium
0061 Rotate List Medium
0062 Unique Paths Medium
0063 Unique Paths II Medium
0064 Minimum Path Sum Medium
0065 Valid Number Hard
0066 Plus One Python Easy
0067 Add Binary Easy
0068 Text Justification Hard
0069 Sqrt(x) JavaScript Easy
0070 Climbing Stairs Python Easy
0071 Simplify Path JavaScript Medium
0072 Edit Distance Hard
0073 Set Matrix Zeroes Medium
0074 Search a 2D Matrix Medium
0075 Sort Colors Medium
0076 Minimum Window Substring Hard
0077 Combinations Medium
0078 Subsets JavaScript Medium
0079 Word Search Medium
0080 Remove Duplicates from Sorted Array II Medium
0081 Search in Rotated Sorted Array II Medium
0082 Remove Duplicates from Sorted List II Python Medium
0083 Remove Duplicates from Sorted List Python Easy
0084 Largest Rectangle in Histogram Hard
0085 Maximal Rectangle Hard
0086 Partition List Medium
0087 Scramble String Hard
0088 Merge Sorted Array Python Easy
0089 Gray Code Medium
0090 Subsets II Medium
0091 Decode Ways Medium
0092 Reverse Linked List II Python Medium
0093 Restore IP Addresses JavaScript Medium
0094 Binary Tree Inorder Traversal Python, JavaScript Medium
0095 Unique Binary Search Trees II Medium
0096 Unique Binary Search Trees Medium
0097 Interleaving String Hard
0098 Validate Binary Search Tree JavaScript Medium
0099 Recover Binary Search Tree Hard
0100 Same Tree Python Easy
0101 Symmetric Tree Easy
0102 Binary Tree Level Order Traversal Python Medium
0103 Binary Tree Zigzag Level Order Traversal Python Medium
0104 Maximum Depth of Binary Tree Python, JavaScript Easy
0105 Construct Binary Tree from Preorder and Inorder Traversal Medium
0106 Construct Binary Tree from Inorder and Postorder Traversal Medium
0107 Binary Tree Level Order Traversal II Easy
0108 Convert Sorted Array to Binary Search Tree Easy
0109 Convert Sorted List to Binary Search Tree Medium
0110 Balanced Binary Tree Python Easy
0111 Minimum Depth of Binary Tree Easy
0112 Path Sum Easy
0113 Path Sum II Medium
0114 Flatten Binary Tree to Linked List Medium
0115 Distinct Subsequences Hard
0116 Populating Next Right Pointers in Each Node Medium
0117 Populating Next Right Pointers in Each Node II Medium
0118 Pascal's Triangle Easy
0119 Pascal's Triangle II Easy
0120 Triangle Medium
0121 Best Time to Buy and Sell Stock JavaScript, Python Easy
0122 Best Time to Buy and Sell Stock II JavaScript Easy
0123 Best Time to Buy and Sell Stock III Hard
0124 Binary Tree Maximum Path Sum Hard
0125 Valid Palindrome Easy
0126 Word Ladder II Hard
0127 Word Ladder Medium
0128 Longest Consecutive Sequence Hard
0129 Sum Root to Leaf Numbers Medium
0130 Surrounded Regions Medium
0131 Palindrome Partitioning Medium
0132 Palindrome Partitioning II Hard
0133 Clone Graph Medium
0134 Gas Station Medium
0135 Candy Hard
0136 Single Number JavaScript Easy
0137 Single Number II Medium
0138 Copy List with Random Pointer Medium
0139 Word Break Medium
0140 Word Break II Hard
0141 Linked List Cycle Easy
0142 Linked List Cycle II JavaScript Medium
0143 Reorder List Medium
0144 Binary Tree Preorder Traversal Medium
0145 Binary Tree Postorder Traversal Hard
0146 LRU Cache JavaScript Medium
0147 Insertion Sort List Medium
0148 Sort List Python, JavaScript Medium
0149 Max Points on a Line Hard
0150 Evaluate Reverse Polish Notation Medium
0151 Reverse Words in a String Medium
0152 Maximum Product Subarray Medium
0153 Find Minimum in Rotated Sorted Array Medium
0154 Find Minimum in Rotated Sorted Array II Hard
0155 Min Stack JavaScript Easy
0156 Binary Tree Upside Down Medium
0157 Read N Characters Given Read4 Easy
0158 Read N Characters Given Read4 II - Call multiple times Hard
0159 Longest Substring with At Most Two Distinct Characters Hard
0160 Intersection of Two Linked Lists Easy
0161 One Edit Distance Medium
0162 Find Peak Element Medium
0163 Missing Ranges Medium
0164 Maximum Gap Hard
0165 Compare Version Numbers Medium
0166 Fraction to Recurring Decimal Medium
0167 Two Sum II - Input array is sorted Easy
0168 Excel Sheet Column Title Easy
0169 Majority Element Easy
0170 Two Sum III - Data structure design Easy
0171 Excel Sheet Column Number Easy
0172 Factorial Trailing Zeroes Easy
0173 Binary Search Tree Iterator Medium
0174 Dungeon Game Hard
0175 Combine Two Tables Easy
0176 Second Highest Salary SQL Easy
0177 Nth Highest Salary Medium
0178 Rank Scores Medium
0179 Largest Number Medium
0180 Consecutive Numbers Medium
0181 Employees Earning More Than Their Managers Easy
0182 Duplicate Emails Easy
0183 Customers Who Never Order Easy
0184 Department Highest Salary Medium
0185 Department Top Three Salaries Hard
0186 Reverse Words in a String II Medium
0187 Repeated DNA Sequences Medium
0188 Best Time to Buy and Sell Stock IV Hard
0189 Rotate Array Easy
0190 Reverse Bits Easy
0191 Number of 1 Bits Easy
0192 Word Frequency Medium
0193 Valid Phone Numbers Easy
0194 Transpose File Medium
0195 Tenth Line Easy
0196 Delete Duplicate Emails Easy
0197 Rising Temperature Easy
0198 House Robber Python Easy
0199 Binary Tree Right Side View Medium
0200 Number of Islands Medium
0201 Bitwise AND of Numbers Range Medium
0202 Happy Number Easy
0203 Remove Linked List Elements Easy
0204 Count Primes Easy
0205 Isomorphic Strings Easy
0206 Reverse Linked List JavaScript, Python Easy
0207 Course Schedule Medium
0208 Implement Trie (Prefix Tree) Medium
0209 Minimum Size Subarray Sum Medium
0210 Course Schedule II Medium
0211 Add and Search Word - Data structure design Medium
0212 Word Search II Hard
0213 House Robber II Medium
0214 Shortest Palindrome Hard
0215 Kth Largest Element in an Array JavaScript Medium
0216 Combination Sum III Medium
0217 Contains Duplicate Easy
0218 The Skyline Problem Hard
0219 Contains Duplicate II Easy
0220 Contains Duplicate III Medium
0221 Maximal Square Medium
0222 Count Complete Tree Nodes Medium
0223 Rectangle Area Medium
0224 Basic Calculator Hard
0225 Implement Stack using Queues Easy
0226 Invert Binary Tree Easy
0227 Basic Calculator II Medium
0228 Summary Ranges Medium
0229 Majority Element II JavaScript Medium
0230 Kth Smallest Element in a BST JavaScript Medium
0231 Power of Two Easy
0232 Implement Queue using Stacks Easy
0233 Number of Digit One Hard
0234 Palindrome Linked List Easy
0235 Lowest Common Ancestor of a Binary Search Tree Easy
0236 Lowest Common Ancestor of a Binary Tree Medium
0237 Delete Node in a Linked List Easy
0238 Product of Array Except Self Medium
0239 Sliding Window Maximum Hard
0240 Search a 2D Matrix II Medium
0241 Different Ways to Add Parentheses Medium
0242 Valid Anagram Python Easy
0243 Shortest Word Distance Easy
0244 Shortest Word Distance II Medium
0245 Shortest Word Distance III Medium
0246 Strobogrammatic Number Easy
0247 Strobogrammatic Number II Medium
0248 Strobogrammatic Number III Hard
0249 Group Shifted Strings Medium
0250 Count Univalue Subtrees Medium
0251 Flatten 2D Vector Medium
0252 Meeting Rooms Easy
0253 Meeting Rooms II Medium
0254 Factor Combinations Medium
0255 Verify Preorder Sequence in Binary Search Tree Medium
0256 Paint House Easy
0257 Binary Tree Paths Easy
0258 Add Digits Easy
0259 3Sum Smaller Medium
0260 Single Number III Python Medium
0261 Graph Valid Tree Medium
0262 Trips and Users Hard
0263 Ugly Number Easy
0264 Ugly Number II Medium
0265 Paint House II Hard
0266 Palindrome Permutation Easy
0267 Palindrome Permutation II Medium
0268 Missing Number Easy
0269 Alien Dictionary Hard
0270 Closest Binary Search Tree Value Easy
0271 Encode and Decode Strings Medium
0272 Closest Binary Search Tree Value II Hard
0273 Integer to English Words Hard
0274 H-Index Medium
0275 H-Index II Medium
0276 Paint Fence Easy
0277 Find the Celebrity Medium
0278 First Bad Version Easy
0279 Perfect Squares Medium
0280 Wiggle Sort Medium
0281 Zigzag Iterator Medium
0282 Expression Add Operators Hard
0283 Move Zeroes Easy
0284 Peeking Iterator Medium
0285 Inorder Successor in BST Medium
0286 Walls and Gates Medium
0287 Find the Duplicate Number JavaScript Medium
0288 Unique Word Abbreviation Medium
0289 Game of Life Medium
0290 Word Pattern Easy
0291 Word Pattern II Hard
0292 Nim Game Easy
0293 Flip Game Easy
0294 Flip Game II Medium
0295 Find Median from Data Stream Hard
0296 Best Meeting Point Hard
0297 Serialize and Deserialize Binary Tree Hard
0298 Binary Tree Longest Consecutive Sequence Medium
0299 Bulls and Cows Medium
0300 Longest Increasing Subsequence Medium
0301 Remove Invalid Parentheses Hard
0302 Smallest Rectangle Enclosing Black Pixels Hard
0303 Range Sum Query - Immutable Python Easy
0304 Range Sum Query 2D - Immutable Medium
0305 Number of Islands II Hard
0306 Additive Number Medium
0307 Range Sum Query - Mutable Medium
0308 Range Sum Query 2D - Mutable Hard
0309 Best Time to Buy and Sell Stock with Cooldown Medium
0310 Minimum Height Trees Medium
0311 Sparse Matrix Multiplication Medium
0312 Burst Balloons Hard
0313 Super Ugly Number Medium
0314 Binary Tree Vertical Order Traversal Medium
0315 Count of Smaller Numbers After Self Hard
0316 Remove Duplicate Letters Hard
0317 Shortest Distance from All Buildings Hard
0318 Maximum Product of Word Lengths Medium
0319 Bulb Switcher Medium
0320 Generalized Abbreviation Medium
0321 Create Maximum Number Hard
0322 Coin Change Medium
0323 Number of Connected Components in an Undirected Graph Medium
0324 Wiggle Sort II Medium
0325 Maximum Size Subarray Sum Equals k Medium
0326 Power of Three Python Easy
0327 Count of Range Sum Hard
0328 Odd Even Linked List Medium
0329 Longest Increasing Path in a Matrix Hard
0330 Patching Array Hard
0331 Verify Preorder Serialization of a Binary Tree Medium
0332 Reconstruct Itinerary Medium
0333 Largest BST Subtree Medium
0334 Increasing Triplet Subsequence Medium
0335 Self Crossing Hard
0336 Palindrome Pairs Hard
0337 House Robber III Medium
0338 Counting Bits Python Medium
0339 Nested List Weight Sum Easy
0340 Longest Substring with At Most K Distinct Characters Hard
0341 Flatten Nested List Iterator Medium
0342 Power of Four Easy
0343 Integer Break Medium
0344 Reverse String Easy
0345 Reverse Vowels of a String Easy
0346 Moving Average from Data Stream Easy
0347 Top K Frequent Elements Python Medium
0348 Design Tic-Tac-Toe Medium
0349 Intersection of Two Arrays Easy
0350 Intersection of Two Arrays II JavaScript Easy
0351 Android Unlock Patterns Medium
0352 Data Stream as Disjoint Intervals Hard
0353 Design Snake Game Medium
0354 Russian Doll Envelopes Hard
0355 Design Twitter Medium
0356 Line Reflection Medium
0357 Count Numbers with Unique Digits Medium
0358 Rearrange String k Distance Apart Hard
0359 Logger Rate Limiter Easy
0360 Sort Transformed Array Medium
0361 Bomb Enemy Medium
0362 Design Hit Counter Medium
0363 Max Sum of Rectangle No Larger Than K Hard
0364 Nested List Weight Sum II Medium
0365 Water and Jug Problem Medium
0366 Find Leaves of Binary Tree Medium
0367 Valid Perfect Square Easy
0368 Largest Divisible Subset Medium
0369 Plus One Linked List Medium
0370 Range Addition Medium
0371 Sum of Two Integers Easy
0372 Super Pow Medium
0373 Find K Pairs with Smallest Sums Medium
0374 Guess Number Higher or Lower Easy
0375 Guess Number Higher or Lower II Medium
0376 Wiggle Subsequence Medium
0377 Combination Sum IV Medium
0378 Kth Smallest Element in a Sorted Matrix Medium
0379 Design Phone Directory Medium
0380 Insert Delete GetRandom O(1) Medium
0381 Insert Delete GetRandom O(1) - Duplicates allowed Hard
0382 Linked List Random Node Medium
0383 Ransom Note Easy
0384 Shuffle an Array Medium
0385 Mini Parser Medium
0386 Lexicographical Numbers Medium
0387 First Unique Character in a String Easy
0388 Longest Absolute File Path Medium
0389 Find the Difference Easy
0390 Elimination Game Medium
0391 Perfect Rectangle Hard
0392 Is Subsequence Medium
0393 UTF-8 Validation JavaScript Medium
0394 Decode String Medium
0395 Longest Substring with At Least K Repeating Characters Medium
0396 Rotate Function Medium
0397 Integer Replacement Medium
0398 Random Pick Index Medium
0399 Evaluate Division Medium
0400 Nth Digit Easy
0401 Binary Watch Easy
0402 Remove K Digits Medium
0403 Frog Jump Hard
0404 Sum of Left Leaves Easy
0405 Convert a Number to Hexadecimal Easy
0406 Queue Reconstruction by Height Medium
0407 Trapping Rain Water II Hard
0408 Valid Word Abbreviation Easy
0409 Longest Palindrome Easy
0410 Split Array Largest Sum Hard
0411 Minimum Unique Word Abbreviation Hard
0412 Fizz Buzz Easy
0413 Arithmetic Slices Medium
0414 Third Maximum Number Python Easy
0415 Add Strings Easy
0416 Partition Equal Subset Sum Medium
0417 Pacific Atlantic Water Flow Medium
0418 Sentence Screen Fitting Medium
0419 Battleships in a Board Medium
0420 Strong Password Checker Hard
0421 Maximum XOR of Two Numbers in an Array Medium
0422 Valid Word Square Easy
0423 Reconstruct Original Digits from English Medium
0424 Longest Repeating Character Replacement Medium
0425 Word Squares Hard
0426 Convert Binary Search Tree to Sorted Doubly Linked List Medium
0427 Construct Quad Tree Medium
0428 Serialize and Deserialize N-ary Tree Hard
0429 N-ary Tree Level Order Traversal Easy
0430 Flatten a Multilevel Doubly Linked List Medium
0431 Encode N-ary Tree to Binary Tree Hard
0432 All O`one Data Structure JavaScript Hard
0433 Minimum Genetic Mutation Medium
0434 Number of Segments in a String Easy
0435 Non-overlapping Intervals Medium
0436 Find Right Interval Medium
0437 Path Sum III Easy
0438 Find All Anagrams in a String Easy
0439 Ternary Expression Parser Medium
0440 K-th Smallest in Lexicographical Order Hard
0441 Arranging Coins Easy
0442 Find All Duplicates in an Array Medium
0443 String Compression JavaScript Easy
0444 Sequence Reconstruction Medium
0445 Add Two Numbers II Python Medium
0446 Arithmetic Slices II - Subsequence Hard
0447 Number of Boomerangs Easy
0448 Find All Numbers Disappeared in an Array Easy
0449 Serialize and Deserialize BST Medium
0450 Delete Node in a BST Medium
0451 Sort Characters By Frequency Python Medium
0452 Minimum Number of Arrows to Burst Balloons Medium
0453 Minimum Moves to Equal Array Elements Easy
0454 4Sum II Medium
0455 Assign Cookies Easy
0456 132 Pattern Medium
0457 Circular Array Loop Medium
0458 Poor Pigs Hard
0459 Repeated Substring Pattern Easy
0460 LFU Cache Hard
0461 Hamming Distance Easy
0462 Minimum Moves to Equal Array Elements II Medium
0463 Island Perimeter Python Easy
0464 Can I Win Medium
0465 Optimal Account Balancing Hard
0466 Count The Repetitions Hard
0467 Unique Substrings in Wraparound String Medium
0468 Validate IP Address Medium
0469 Convex Polygon Medium
0470 Implement Rand10() Using Rand7() Medium
0471 Encode String with Shortest Length Hard
0472 Concatenated Words Hard
0473 Matchsticks to Square Medium
0474 Ones and Zeroes Medium
0475 Heaters Easy
0476 Number Complement Easy
0477 Total Hamming Distance Medium
0478 Generate Random Point in a Circle Medium
0479 Largest Palindrome Product Hard
0480 Sliding Window Median Hard
0481 Magical String Medium
0482 License Key Formatting Easy
0483 Smallest Good Base Hard
0484 Find Permutation Medium
0485 Max Consecutive Ones Easy
0486 Predict the Winner Medium
0487 Max Consecutive Ones II Medium
0488 Zuma Game Hard
0489 Robot Room Cleaner Hard
0490 The Maze Medium
0491 Increasing Subsequences Medium
0492 Construct the Rectangle Easy
0493 Reverse Pairs Hard
0494 Target Sum Medium
0495 Teemo Attacking Medium
0496 Next Greater Element I Easy
0497 Random Point in Non-overlapping Rectangles Medium
0498 Diagonal Traverse Medium
0499 The Maze III Hard
0500 Keyboard Row Easy
0501 Find Mode in Binary Search Tree Easy
0502 IPO Hard
0503 Next Greater Element II Medium
0504 Base 7 Easy
0505 The Maze II Medium
0506 Relative Ranks Easy
0507 Perfect Number Easy
0508 Most Frequent Subtree Sum Medium
0509 Fibonacci Number Easy
0510 Inorder Successor in BST II Medium
0511 Game Play Analysis I Easy
0512 Game Play Analysis II Easy
0513 Find Bottom Left Tree Value Medium
0514 Freedom Trail Hard
0515 Find Largest Value in Each Tree Row Medium
0516 Longest Palindromic Subsequence Medium
0517 Super Washing Machines Hard
0518 Coin Change 2 Medium
0519 Random Flip Matrix Medium
0520 Detect Capital Easy
0521 Longest Uncommon Subsequence I Easy
0522 Longest Uncommon Subsequence II Medium
0523 Continuous Subarray Sum Medium
0524 Longest Word in Dictionary through Deleting Python Medium
0525 Contiguous Array Medium
0526 Beautiful Arrangement Medium
0527 Word Abbreviation Hard
0528 Random Pick with Weight Medium
0529 Minesweeper Medium
0530 Minimum Absolute Difference in BST Easy
0531 Lonely Pixel I Medium
0532 K-diff Pairs in an Array Easy
0533 Lonely Pixel II Medium
0534 Game Play Analysis III Medium
0535 Encode and Decode TinyURL Medium
0536 Construct Binary Tree from String Medium
0537 Complex Number Multiplication Medium
0538 Convert BST to Greater Tree Easy
0539 Minimum Time Difference Medium
0540 Single Element in a Sorted Array Medium
0541 Reverse String II Easy
0542 01 Matrix Medium
0543 Diameter of Binary Tree Easy
0544 Output Contest Matches Medium
0545 Boundary of Binary Tree Medium
0546 Remove Boxes Hard
0547 Friend Circles JavaScript Medium
0548 Split Array with Equal Sum Medium
0549 Binary Tree Longest Consecutive Sequence II Medium
0550 Game Play Analysis IV Medium
0551 Student Attendance Record I JavaScript Easy
0552 Student Attendance Record II Hard
0553 Optimal Division Medium
0554 Brick Wall Medium
0555 Split Concatenated Strings Medium
0556 Next Greater Element III Medium
0557 Reverse Words in a String III Easy
0558 Quad Tree Intersection Easy
0559 Maximum Depth of N-ary Tree Easy
0560 Subarray Sum Equals K Medium
0561 Array Partition I Easy
0562 Longest Line of Consecutive One in Matrix Medium
0563 Binary Tree Tilt Easy
0564 Find the Closest Palindrome Hard
0565 Array Nesting JavaScript Medium
0566 Reshape the Matrix Easy
0567 Permutation in String Medium
0568 Maximum Vacation Days Hard
0569 Median Employee Salary Hard
0570 Managers with at Least 5 Direct Reports Medium
0571 Find Median Given Frequency of Numbers Hard
0572 Subtree of Another Tree Easy
0573 Squirrel Simulation Medium
0574 Winning Candidate Medium
0575 Distribute Candies Easy
0576 Out of Boundary Paths Medium
0577 Employee Bonus Easy
0578 Get Highest Answer Rate Question Medium
0579 Find Cumulative Salary of an Employee Hard
0580 Count Student Number in Departments Medium
0581 Shortest Unsorted Continuous Subarray Easy
0582 Kill Process Medium
0583 Delete Operation for Two Strings Medium
0584 Find Customer Referee Easy
0585 Investments in 2016 Medium
0586 Customer Placing the Largest Number of Orders Easy
0587 Erect the Fence Hard
0588 Design In-Memory File System Hard
0589 N-ary Tree Preorder Traversal Easy
0590 N-ary Tree Postorder Traversal Easy
0591 Tag Validator Hard
0592 Fraction Addition and Subtraction Medium
0593 Valid Square Medium
0594 Longest Harmonious Subsequence Easy
0595 Big Countries SQL Easy
0596 Classes More Than 5 Students Easy
0597 Friend Requests I: Overall Acceptance Rate Easy
0598 Range Addition II Easy
0599 Minimum Index Sum of Two Lists Easy
0600 Non-negative Integers without Consecutive Ones Hard
0601 Human Traffic of Stadium Hard
0602 Friend Requests II: Who Has the Most Friends Medium
0603 Consecutive Available Seats Easy
0604 Design Compressed String Iterator Easy
0605 Can Place Flowers Easy
0606 Construct String from Binary Tree Easy
0607 Sales Person Easy
0608 Tree Node Medium
0609 Find Duplicate File in System Medium
0610 Triangle Judgement Easy
0611 Valid Triangle Number Medium
0612 Shortest Distance in a Plane Medium
0613 Shortest Distance in a Line Easy
0614 Second Degree Follower Medium
0615 Average Salary: Departments VS Company Hard
0616 Add Bold Tag in String Medium
0617 Merge Two Binary Trees Easy
0618 Students Report By Geography Hard
0619 Biggest Single Number Easy
0620 Not Boring Movies Easy
0621 Task Scheduler Medium
0622 Design Circular Queue Medium
0623 Add One Row to Tree Medium
0624 Maximum Distance in Arrays Easy
0625 Minimum Factorization Medium
0626 Exchange Seats Medium
0627 Swap Salary Easy
0628 Maximum Product of Three Numbers Easy
0629 K Inverse Pairs Array Hard
0630 Course Schedule III Hard
0631 Design Excel Sum Formula Hard
0632 Smallest Range Hard
0633 Sum of Square Numbers Easy
0634 Find the Derangement of An Array Medium
0635 Design Log Storage System Medium
0636 Exclusive Time of Functions Medium
0637 Average of Levels in Binary Tree Easy
0638 Shopping Offers Medium
0639 Decode Ways II Hard
0640 Solve the Equation Medium
0641 Design Circular Deque Medium
0642 Design Search Autocomplete System Hard
0643 Maximum Average Subarray I Easy
0644 Maximum Average Subarray II Hard
0645 Set Mismatch Easy
0646 Maximum Length of Pair Chain Medium
0647 Palindromic Substrings Medium
0648 Replace Words Medium
0649 Dota2 Senate Medium
0650 2 Keys Keyboard Medium
0651 4 Keys Keyboard Medium
0652 Find Duplicate Subtrees Medium
0653 Two Sum IV - Input is a BST Easy
0654 Maximum Binary Tree Medium
0655 Print Binary Tree Medium
0656 Coin Path Hard
0657 Robot Return to Origin Easy
0658 Find K Closest Elements Medium
0659 Split Array into Consecutive Subsequences Medium
0660 Remove 9 Hard
0661 Image Smoother Easy
0662 Maximum Width of Binary Tree Medium
0663 Equal Tree Partition Medium
0664 Strange Printer Hard
0665 Non-decreasing Array Easy
0666 Path Sum IV Medium
0667 Beautiful Arrangement II Medium
0668 Kth Smallest Number in Multiplication Table Hard
0669 Trim a Binary Search Tree Easy
0670 Maximum Swap JavaScript Medium
0671 Second Minimum Node In a Binary Tree Easy
0672 Bulb Switcher II Medium
0673 Number of Longest Increasing Subsequence Medium
0674 Longest Continuous Increasing Subsequence Easy
0675 Cut Off Trees for Golf Event Hard
0676 Implement Magic Dictionary Medium
0677 Map Sum Pairs Medium
0678 Valid Parenthesis String Medium
0679 24 Game Hard
0680 Valid Palindrome II Easy
0681 Next Closest Time Medium
0682 Baseball Game Easy
0683 K Empty Slots Hard
0684 Redundant Connection Medium
0685 Redundant Connection II Hard
0686 Repeated String Match JavaScript Easy
0687 Longest Univalue Path Easy
0688 Knight Probability in Chessboard Medium
0689 Maximum Sum of 3 Non-Overlapping Subarrays Hard
0690 Employee Importance Easy
0691 Stickers to Spell Word Hard
0692 Top K Frequent Words Medium
0693 Binary Number with Alternating Bits Easy
0694 Number of Distinct Islands Medium
0695 Max Area of Island JavaScript Medium
0696 Count Binary Substrings Easy
0697 Degree of an Array Easy
0698 Partition to K Equal Sum Subsets Medium
0699 Falling Squares Hard
0700 Search in a Binary Search Tree Easy
0701 Insert into a Binary Search Tree Medium
0702 Search in a Sorted Array of Unknown Size Medium
0703 Kth Largest Element in a Stream Easy
0704 Binary Search Easy
0705 Design HashSet Easy
0706 Design HashMap Easy
0707 Design Linked List Easy
0708 Insert into a Cyclic Sorted List Medium
0709 To Lower Case JavaScript, Python Easy
0710 Random Pick with Blacklist Hard
0711 Number of Distinct Islands II Hard
0712 Minimum ASCII Delete Sum for Two Strings Medium
0713 Subarray Product Less Than K Medium
0714 Best Time to Buy and Sell Stock with Transaction Fee Medium
0715 Range Module Hard
0716 Max Stack Easy
0717 1-bit and 2-bit Characters Easy
0718 Maximum Length of Repeated Subarray Medium
0719 Find K-th Smallest Pair Distance Hard
0720 Longest Word in Dictionary Easy
0721 Accounts Merge Medium
0722 Remove Comments Medium
0723 Candy Crush Medium
0724 Find Pivot Index Easy
0725 Split Linked List in Parts Medium
0726 Number of Atoms Python Hard
0727 Minimum Window Subsequence Hard
0728 Self Dividing Numbers Easy
0729 My Calendar I Medium
0730 Count Different Palindromic Subsequences Hard
0731 My Calendar II Medium
0732 My Calendar III Hard
0733 Flood Fill Easy
0734 Sentence Similarity Easy
0735 Asteroid Collision Medium
0736 Parse Lisp Expression Hard
0737 Sentence Similarity II Medium
0738 Monotone Increasing Digits Medium
0739 Daily Temperatures Medium
0740 Delete and Earn Medium
0741 Cherry Pickup Hard
0742 Closest Leaf in a Binary Tree Medium
0743 Network Delay Time Medium
0744 Find Smallest Letter Greater Than Target Easy
0745 Prefix and Suffix Search Hard
0746 Min Cost Climbing Stairs Python Easy
0747 Largest Number At Least Twice of Others Easy
0748 Shortest Completing Word Easy
0749 Contain Virus Hard
0750 Number Of Corner Rectangles Medium
0751 IP to CIDR Easy
0752 Open the Lock Medium
0753 Cracking the Safe Hard
0754 Reach a Number Easy
0755 Pour Water Medium
0756 Pyramid Transition Matrix Medium
0757 Set Intersection Size At Least Two Hard
0758 Bold Words in String Easy
0759 Employee Free Time Hard
0760 Find Anagram Mappings Easy
0761 Special Binary String Hard
0762 Prime Number of Set Bits in Binary Representation Easy
0763 Partition Labels Medium
0764 Largest Plus Sign Medium
0765 Couples Holding Hands Hard
0766 Toeplitz Matrix Easy
0767 Reorganize String Medium
0768 Max Chunks To Make Sorted II Hard
0769 Max Chunks To Make Sorted Medium
0770 Basic Calculator IV Hard
0771 Jewels and Stones JavaScript, Python Easy
0772 Basic Calculator III Hard
0773 Sliding Puzzle Hard
0774 Minimize Max Distance to Gas Station Hard
0775 Global and Local Inversions Medium
0776 Split BST Medium
0777 Swap Adjacent in LR String Medium
0778 Swim in Rising Water Hard
0779 K-th Symbol in Grammar Medium
0780 Reaching Points Hard
0781 Rabbits in Forest Medium
0782 Transform to Chessboard Hard
0783 Minimum Distance Between BST Nodes Easy
0784 Letter Case Permutation Easy
0785 Is Graph Bipartite? Medium
0786 K-th Smallest Prime Fraction Hard
0787 Cheapest Flights Within K Stops Medium
0788 Rotated Digits Easy
0789 Escape The Ghosts Medium
0790 Domino and Tromino Tiling Medium
0791 Custom Sort String Medium
0792 Number of Matching Subsequences Medium
0793 Preimage Size of Factorial Zeroes Function Hard
0794 Valid Tic-Tac-Toe State Medium
0795 Number of Subarrays with Bounded Maximum Medium
0796 Rotate String Easy
0797 All Paths From Source to Target Medium
0798 Smallest Rotation with Highest Score Hard
0799 Champagne Tower Medium
0800 Similar RGB Color Easy
0801 Minimum Swaps To Make Sequences Increasing Medium
0802 Find Eventual Safe States Medium
0803 Bricks Falling When Hit Hard
0804 Unique Morse Code Words Easy
0805 Split Array With Same Average Hard
0806 Number of Lines To Write String Easy
0807 Max Increase to Keep City Skyline Medium
0808 Soup Servings Medium
0809 Expressive Words Medium
0810 Chalkboard XOR Game Hard
0811 Subdomain Visit Count Easy
0812 Largest Triangle Area Easy
0813 Largest Sum of Averages Medium
0814 Binary Tree Pruning Medium
0815 Bus Routes Hard
0816 Ambiguous Coordinates Medium
0817 Linked List Components Medium
0818 Race Car Hard
0819 Most Common Word Easy
0820 Short Encoding of Words Medium
0821 Shortest Distance to a Character Easy
0822 Card Flipping Game Medium
0823 Binary Trees With Factors Medium
0824 Goat Latin Easy
0825 Friends Of Appropriate Ages Medium
0826 Most Profit Assigning Work Medium
0827 Making A Large Island Hard
0828 Unique Letter String Hard
0829 Consecutive Numbers Sum Hard
0830 Positions of Large Groups Easy
0831 Masking Personal Information Medium
0832 Flipping an Image JavaScript Easy
0833 Find And Replace in String Medium
0834 Sum of Distances in Tree Hard
0835 Image Overlap Medium
0836 Rectangle Overlap Easy
0837 New 21 Game Medium
0838 Push Dominoes Medium
0839 Similar String Groups Hard
0840 Magic Squares In Grid Easy
0841 Keys and Rooms Medium
0842 Split Array into Fibonacci Sequence Medium
0843 Guess the Word Hard
0844 Backspace String Compare Easy
0845 Longest Mountain in Array Medium
0846 Hand of Straights Medium
0847 Shortest Path Visiting All Nodes Hard
0848 Shifting Letters Medium
0849 Maximize Distance to Closest Person Easy
0850 Rectangle Area II Hard
0851 Loud and Rich Medium
0852 Peak Index in a Mountain Array Easy
0853 Car Fleet Medium
0854 K-Similar Strings Hard
0855 Exam Room Medium
0856 Score of Parentheses Medium
0857 Minimum Cost to Hire K Workers Hard
0858 Mirror Reflection Medium
0859 Buddy Strings Easy
0860 Lemonade Change Easy
0861 Score After Flipping Matrix Medium
0862 Shortest Subarray with Sum at Least K Hard
0863 All Nodes Distance K in Binary Tree Medium
0864 Shortest Path to Get All Keys Hard
0865 Smallest Subtree with all the Deepest Nodes Medium
0866 Prime Palindrome Medium
0867 Transpose Matrix Easy
0868 Binary Gap Easy
0869 Reordered Power of 2 Medium
0870 Advantage Shuffle Medium
0871 Minimum Number of Refueling Stops Hard
0872 Leaf-Similar Trees Easy
0873 Length of Longest Fibonacci Subsequence Medium
0874 Walking Robot Simulation Easy
0875 Koko Eating Bananas Medium
0876 Middle of the Linked List Python Easy
0877 Stone Game Python Medium
0878 Nth Magical Number Hard
0879 Profitable Schemes Hard
0880 Decoded String at Index Medium
0881 Boats to Save People Medium
0882 Reachable Nodes In Subdivided Graph Hard
0883 Projection Area of 3D Shapes Easy
0884 Uncommon Words from Two Sentences Easy
0885 Spiral Matrix III Medium
0886 Possible Bipartition Medium
0887 Super Egg Drop Hard
0888 Fair Candy Swap Easy
0889 Construct Binary Tree from Preorder and Postorder Traversal Medium
0890 Find and Replace Pattern Medium
0891 Sum of Subsequence Widths Hard
0892 Surface Area of 3D Shapes Easy
0893 Groups of Special-Equivalent Strings Easy
0894 All Possible Full Binary Trees Medium
0895 Maximum Frequency Stack Hard
0896 Monotonic Array Easy
0897 Increasing Order Search Tree Easy
0898 Bitwise ORs of Subarrays Medium
0899 Orderly Queue Hard
0900 RLE Iterator Medium
0901 Online Stock Span Medium
0902 Numbers At Most N Given Digit Set Hard
0903 Valid Permutations for DI Sequence Hard
0904 Fruit Into Baskets Medium
0905 Sort Array By Parity JavaScript Easy
0906 Super Palindromes Hard
0907 Sum of Subarray Minimums Medium
0908 Smallest Range I Easy
0909 Snakes and Ladders Medium
0910 Smallest Range II Medium
0911 Online Election Medium
0912 Sort an Array Medium
0913 Cat and Mouse Hard
0914 X of a Kind in a Deck of Cards Python Easy
0915 Partition Array into Disjoint Intervals Medium
0916 Word Subsets Medium
0917 Reverse Only Letters Easy
0918 Maximum Sum Circular Subarray Medium
0919 Complete Binary Tree Inserter Medium
0920 Number of Music Playlists Hard
0921 Minimum Add to Make Parentheses Valid Medium
0922 Sort Array By Parity II Easy
0923 3Sum With Multiplicity Medium
0924 Minimize Malware Spread Hard
0925 Long Pressed Name Easy
0926 Flip String to Monotone Increasing Medium
0927 Three Equal Parts Hard
0928 Minimize Malware Spread II Hard
0929 Unique Email Addresses JavaScript Easy
0930 Binary Subarrays With Sum Medium
0931 Minimum Falling Path Sum Medium
0932 Beautiful Array Medium
0933 Number of Recent Calls Easy
0934 Shortest Bridge Medium
0935 Knight Dialer Medium
0936 Stamping The Sequence Hard
0937 Reorder Log Files Easy
0938 Range Sum of BST Easy
0939 Minimum Area Rectangle Medium
0940 Distinct Subsequences II Hard
0941 Valid Mountain Array Easy
0942 DI String Match Easy
0943 Find the Shortest Superstring Hard
0944 Delete Columns to Make Sorted Easy
0945 Minimum Increment to Make Array Unique Medium
0946 Validate Stack Sequences Medium
0947 Most Stones Removed with Same Row or Column Medium
0948 Bag of Tokens Medium
0949 Largest Time for Given Digits Easy
0950 Reveal Cards In Increasing Order Medium
0951 Flip Equivalent Binary Trees Medium
0952 Largest Component Size by Common Factor Hard
0953 Verifying an Alien Dictionary Easy
0954 Array of Doubled Pairs Medium
0955 Delete Columns to Make Sorted II Medium
0956 Tallest Billboard Hard
0957 Prison Cells After N Days Medium
0958 Check Completeness of a Binary Tree Medium
0959 Regions Cut By Slashes Medium
0960 Delete Columns to Make Sorted III Hard
0961 N-Repeated Element in Size 2N Array Go, JavaScript Easy
0962 Maximum Width Ramp Medium
0963 Minimum Area Rectangle II Medium
0964 Least Operators to Express Number Hard
0965 Univalued Binary Tree Easy
0966 Vowel Spellchecker Medium
0967 Numbers With Same Consecutive Differences Medium
0968 Binary Tree Cameras Hard
0969 Pancake Sorting Medium
0970 Powerful Integers Easy
0971 Flip Binary Tree To Match Preorder Traversal Medium
0972 Equal Rational Numbers Hard
0973 K Closest Points to Origin Medium
0974 Subarray Sums Divisible by K Medium
0975 Odd Even Jump Hard
0976 Largest Perimeter Triangle Easy
0977 Squares of a Sorted Array Easy
0978 Longest Turbulent Subarray Medium
0979 Distribute Coins in Binary Tree Medium
0980 Unique Paths III Hard
0981 Time Based Key-Value Store Medium
0982 Triples with Bitwise AND Equal To Zero Hard
0983 Minimum Cost For Tickets Medium
0984 String Without AAA or BBB Medium
0985 Sum of Even Numbers After Queries Easy
0986 Interval List Intersections Medium
0987 Vertical Order Traversal of a Binary Tree Medium
0988 Smallest String Starting From Leaf Medium
0989 Add to Array-Form of Integer Easy
0990 Satisfiability of Equality Equations Medium
0991 Broken Calculator Medium
0992 Subarrays with K Different Integers Hard
0993 Cousins in Binary Tree Easy
0994 Rotting Oranges Easy
0995 Minimum Number of K Consecutive Bit Flips Hard
0996 Number of Squareful Arrays Hard
0997 Find the Town Judge Easy
0998 Maximum Binary Tree II Medium
0999 Available Captures for Rook Easy
1000 Minimum Cost to Merge Stones Hard
1001 Grid Illumination Hard
1002 Find Common Characters Easy
1003 Check If Word Is Valid After Substitutions Medium
1004 Max Consecutive Ones III Medium
1005 Maximize Sum Of Array After K Negations Easy
1006 Clumsy Factorial Medium
1007 Minimum Domino Rotations For Equal Row Medium
1008 Construct Binary Search Tree from Preorder Traversal Medium
1009 Complement of Base 10 Integer Easy
1010 Pairs of Songs With Total Durations Divisible by 60 Easy
1011 Capacity To Ship Packages Within D Days Medium
1012 Numbers With Repeated Digits Hard
1013 Partition Array Into Three Parts With Equal Sum Easy
1014 Best Sightseeing Pair Medium
1015 Smallest Integer Divisible by K Medium
1016 Binary String With Substrings Representing 1 To N Medium
1017 Convert to Base -2 Medium
1018 Binary Prefix Divisible By 5 Easy
1019 Next Greater Node In Linked List Medium
1020 Number of Enclaves Medium
1021 Remove Outermost Parentheses Easy
1022 Sum of Root To Leaf Binary Numbers Easy
1023 Camelcase Matching Medium
1024 Video Stitching Medium
1025 Divisor Game Easy
1026 Maximum Difference Between Node and Ancestor Medium
1027 Longest Arithmetic Sequence Medium
1028 Recover a Tree From Preorder Traversal Hard
1029 Two City Scheduling Easy
1030 Matrix Cells in Distance Order Easy
1031 Maximum Sum of Two Non-Overlapping Subarrays Medium
1032 Stream of Characters Hard
1033 Moving Stones Until Consecutive Easy
1034 Coloring A Border Medium
1035 Uncrossed Lines Medium
1036 Escape a Large Maze Hard
1037 Valid Boomerang Easy
1038 Binary Search Tree to Greater Sum Tree Medium
1039 Minimum Score Triangulation of Polygon Medium
1040 Moving Stones Until Consecutive II Medium
1041 Robot Bounded In Circle Easy
1042 Flower Planting With No Adjacent Easy
1043 Partition Array for Maximum Sum Medium
1044 Longest Duplicate Substring Hard
1045 Customers Who Bought All Products Medium
1046 Last Stone Weight Easy
1047 Remove All Adjacent Duplicates In String Easy
1048 Longest String Chain Medium
1049 Last Stone Weight II Medium
1050 Actors and Directors Who Cooperated At Least Three Times Easy
1051 Height Checker Easy
1052 Grumpy Bookstore Owner Medium
1053 Previous Permutation With One Swap Medium
1054 Distant Barcodes Medium
1055 Shortest Way to Form String Medium
1056 Confusing Number Easy
1057 Campus Bikes Medium
1058 Minimize Rounding Error to Meet Target Medium
1059 All Paths from Source Lead to Destination Medium
1060 Missing Element in Sorted Array Medium
1061 Lexicographically Smallest Equivalent String Medium
1062 Longest Repeating Substring Medium
1063 Number of Valid Subarrays Hard
1064 Fixed Point Easy
1065 Index Pairs of a String Easy
1066 Campus Bikes II Medium
1067 Digit Count in Range Hard
1068 Product Sales Analysis I Easy
1069 Product Sales Analysis II Easy
1070 Product Sales Analysis III Medium
1071 Greatest Common Divisor of Strings Easy
1072 Flip Columns For Maximum Number of Equal Rows Medium
1073 Adding Two Negabinary Numbers Medium
1074 Number of Submatrices That Sum to Target Hard
1075 Project Employees I Easy
1076 Project Employees II Easy
1077 Project Employees III Medium
1078 Occurrences After Bigram Easy
1079 Letter Tile Possibilities Medium
1080 Insufficient Nodes in Root to Leaf Paths Medium
1081 Smallest Subsequence of Distinct Characters Medium
1082 Sales Analysis I Easy
1083 Sales Analysis II Easy
1084 Sales Analysis III Easy
1085 Sum of Digits in the Minimum Number Easy
1086 High Five Easy
1087 Brace Expansion Medium
1088 Confusing Number II Hard
1089 Duplicate Zeros Easy
1090 Largest Values From Labels Medium
1091 Shortest Path in Binary Matrix Medium
1092 Shortest Common Supersequence Hard

回到顶部 🔝

About

💯 Some Leetcode algorithm and data structure answer wrote by Python/Javascript/Go...

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published