Skip to content

Explore diverse LeetCode solutions in Python, C++, JavaScript, SQL, and TypeScript. Ideal for interview prep, learning, and code practice in multiple programming languages.

License

Notifications You must be signed in to change notification settings

hogan-tech/leetcode-solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions

Python C++ JavaScript SQL TypeScript

Welcome to a robust and versatile repository of LeetCode solutions! This repository is a treasure trove for coding enthusiasts, educators, students, and professionals who are preparing for technical interviews or enhancing their coding skills.

What You'll Find Here

  • Wide Range of Problems: Our collection includes an extensive range of LeetCode problems, covering various topics and difficulty levels – from Easy to Hard.
  • Multi-Language Support: We offer solutions in several programming languages, including Python, C++, JavaScript, SQL, and TypeScript, catering to a diverse coding community.
  • Organized and Accessible: Each solution is meticulously organized by difficulty and language, making it easy to navigate and find what you need.
  • In-Depth Explanations: You'll find README files in each problem folder with detailed explanations of the problem, the approach taken, and a thorough walkthrough of the solution.

Statistics

hogan-tech-leetcode

Folder Structure

The solutions are organized as follows:

  • Difficulty: Problems are categorized into Easy, Medium, and Hard.
  • Languages: Solutions are available in multiple programming languages, including Python, C++, JavaScript, SQL, and TypeScript.
  • Problem Titles: Each problem is named after its LeetCode title.

Question List

# Title Solution Difficulty & ReadMe
0001 Two Sum Python, C++ Easy
0002 Add Two Numbers C++ Medium
0003 Longest Substring Without Repeating Characters Python, C++ Medium
0004 Median of Two Sorted Arrays Python Hard
0005 Longest Palindromic Substring Python Medium
0006 ZigZag Conversion Python Medium
0007 Reverse Integer Python Medium
0008 String to Integer (atoi) Python Medium
0009 Palindrome Number C++ Easy
0010 Regular Expression Matching Python Hard
0011 Container With Most Water Python Medium
0012 Integer to Roman Python Medium
0013 Roman to Integer C++ Easy
0014 Longest Common Prefix C++ Easy
0015 3Sum Python, C++ Medium
0016 3Sum Closest Python Medium
0017 Letter Combinations of a Phone Number Python Medium
0018 4Sum Python Medium
0019 Remove Nth Node From End of List Python, C++ Medium
0020 Valid Parentheses Python, C++, JavaScript Easy
0021 Merge Two Sorted Lists Python, C++, Javascript Easy
0022 Generate Parentheses Python Medium
0023 Merge k Sorted Lists Python Hard
0024 Swap Nodes in Pairs Python Medium
0025 Reverse Nodes in k-Group Python Hard
0026 Remove Duplicates from Sorted Array Python Easy
0027 Remove Element Python Easy
0028 Implement strStr() Python Easy
0029 Divide Two Integers Python Medium
0030 Substring with Concatenation of All Words Python Hard
0031 Next Permutation Python Medium
0032 Longest Valid Parentheses Python Hard
0033 Search in Rotated Sorted Array Python Medium
0034 Find First and Last Position of Element in Sorted Array Python Medium
0035 Search Insert Position Python, C++ Easy
0036 Valid Sudoku Python, C++ Medium
0037 Sudoku Solver Python Hard
0038 Count and Say Python Medium
0039 Combination Sum Python Medium
0040 Combination Sum II Python Medium
0041 First Missing Positive Python Hard
0042 Trapping Rain Water Python Hard
0043 Multiply Strings Python Medium
0045 Jump Game II C++ Hard
0046 Permutations C++ Medium
0047 Permutations II Python Medium
0048 Rotate Image C++ Medium
0049 Group Anagrams Python, JavaScript Medium
0050 Pow(x, n) Python Medium
0051 N Queens Python Hard
0052 N Queens II Python Hard
0053 Maximum Subarray Python, C++ Easy
0054 Spiral Matrix Python, C++ Medium
0055 Jump Game C++ Medium
0056 Merge Intervals Python, C++ Medium
0057 Insert Interval Python Hard
0058 Length of Last Word Python Easy
0059 Spiral Matrix II C++ Medium
0061 Rotate List Python Medium
0062 Unique Paths Python Medium
0063 Unique Paths II Python Medium
0064 Minimum Path Sum Python Medium
0066 Plus One Python Easy
0067 Add Binary Python Easy
0068 Text Justification Python Hard
0069 Sqrt(x) Python Easy
0070 Climbing Stairs Python, C++ Easy
0071 Simplify Path Python Medium
0072 Edit Distance Python Medium
0073 Set Matrix Zeroes Python Medium
0074 Search a 2D Matrix Python, C++ Medium
0075 Sort Colors Python, JavaScript, C++ Medium
0076 Minimum Window Substring Python Hard
0077 Combinations Python, C++ Medium
0078 Subsets Python, JavaScript Medium
0079 Word Search Python Medium
0080 Remove Duplicates from Sorted Array II Python Medium
0081 Search in Rotated Sorted Array II Python Medium
0082 Remove Duplicates from Sorted List II Python Medium
0083 Remove Duplicates from Sorted List C++ Easy
0084 Largest Rectangle in Histogram Python Hard
0085 Maximal Rectangle Python Hard
0086 Partition List Python Medium
0088 Merge Sorted Array C++ Easy
0090 Subsets II Python Medium
0091 Decode Ways Python Medium
0092 Reverse Linked List II Python Medium
0093 Restore IP Addresses Python Medium
0094 Binary Tree Inorder Traversal Python, C++, JavaScript Easy
0095 Unique Binary Search Trees II Python Medium
0096 Unique Binary Search Trees Python Medium
0097 Interleaving String Python Medium
0098 Validate Binary Search Tree Python, C++ Medium
0100 Same Tree Python, JavaScript Easy
0101 Symmetric Tree C++ Easy
0102 Binary Tree Level Order Traversal Python, C++ Medium
0103 Binary Tree Zigzag Level Order Traversal Python Medium
0104 Maximum Depth of Binary Tree Python, C++ Easy
0105 Construct Binary Tree from Preorder and Inorder Traversal Python Medium
0106 Construct Binary Tree from Inorder and Postorder Traversal Python Medium
0108 Convert Sorted Array to Binary Search Tree Python Easy
0110 Balanced Binary Tree Python Easy
0111 Minimum Depth of Binary Tree Python Easy
0112 Path Sum Python, C++ Easy
0113 Path Sum II Python Medium
0114 Flatten Binary Tree to Linked List Python Medium
0115 Distinct Subsequences Python Hard
0116 Populating Next Right Pointers in Each Node C++ Medium
0117 Populating Next Right Pointers in Each Node II Python Medium
0118 Pascal's Triangle Python, C++ Easy
0119 Pascal's Triangle II Python, C++ Easy
0120 Triangle Python, C++ Medium
0121 Best Time to Buy and Sell Stock Python, C++ Easy
0122 Best Time to Buy and Sell Stock II Python Medium
0123 Best Time to Buy and Sell Stock III Python Hard
0124 Binary Tree Maximum Path Sum Python Medium
0125 Valid Palindrome Python Easy
0127 Word Ladder Python Medium
0128 Longest Consecutive Sequence Python Hard
0129 Sum Root to Leaf Numbers Python Medium
0130 Surrounded Regions Python Medium
0131 Palindrome Partitioning Python Medium
0133 Clone Graph Python Medium
0134 Gas Station Python Medium
0135 Candy Python Hard
0136 Single Number Python, C++ Easy
0137 Single Number II Python Medium
0138 Copy List with Random Pointer Python Medium
0139 Word Break Python Medium
0140 Word Break II Python Hard
0141 Linked List Cycle Python, C++, JavaScript Easy
0142 Linked List Cycle II Python Medium
0143 Reorder List Python Medium
0144 Binary Tree Preorder Traversal Python, C++, JavaScript Easy
0145 Binary Tree Postorder Traversal Python, C++, JavaScript Easy
0146 LRU Cache Python Medium
0148 Sort List Python Medium
0149 Max Points on a Line Python Hard
0150 Evaluate Reverse Polish Notation Python Medium
0151 Reverse Words in a String Python Medium
0152 Maximum Product Subarray Python Medium
0153 Find Minimum in Rotated Sorted Array Python, JavaScript Medium
0155 Min Stack Python Easy
0159 Longest Substring with At Most Two Distinct Characters Python Medium
0160 Intersection of Two Linked Lists Python Easy
0162 Find Peak Element Python Medium
0165 Compare Version Numbers Python Medium
0166 Fraction to Recurring Decimal Python Medium
0167 Two Sum II - Input array is sorted Python, C++ Easy
0168 Excel Sheet Column Title Python Easy
0169 Majority Element Python, C++ Easy
0172 Factorial Trailing Zeroes Python Medium
0173 Binary Search Tree Iterator Python Medium
0179 Largest Number Python Medium
0188 Best Time to Buy and Sell Stock IV Python Hard
0189 Rotate Array C++ Medium
0190 Reverse Bits Python Easy
0191 Number of 1 Bits Python Easy
0198 House Robber Python, C++ Easy
0199 Binary Tree Right Side View Python Medium
0200 Number of Islands Python Medium
0201 Bitwise AND of Numbers Range Python Medium
0202 Happy Number Python Easy
0203 Remove Linked List Elements C++ Easy
0205 Isomorphic Strings Python Easy
0206 Reverse Linked List Python, C++, JavaScript Easy
0207 Course Schedule Python Medium
0208 Implement Trie (Prefix Tree) Python Medium
0209 Minimum Size Subarray Sum Python Medium
0210 Course Schedule II Python Medium
0211 Design Add and Search Words Data Structure Python Medium
0212 Word Search II Python Hard
0213 House Robber II C++ Medium
0214 Shortest Palindrome Python Hard
0215 Kth Largest Element in an Array Python Medium
0216 Combination Sum III Python Medium
0217 Contains Duplicate Python, C++, JavaScript Easy
0219 Contains Duplicate II Python Easy
0221 Maximal Square Python Medium
0222 Count Complete Tree Nodes Python Easy
0224 Basic Calculator Python Hard
0225 Implement Stack using Queues Python Easy
0226 Invert Binary Tree Python, JavaScript Easy
0227 Basic Calculator II Python Medium
0228 Summary Ranges Python Easy
0229 Majority Element II Python Medium
0230 Kth Smallest Element in a BST Python Medium
0231 Power of Two C++ Easy
0232 Implement Queue using Stacks Python, C++ Easy
0234 Palindrome Linked List Python Easy
0235 Lowest Common Ancestor of a Binary Search Tree Python, C++ Easy
0236 Lowest Common Ancestor of a Binary Tree Python Medium
0237 Delete Node in a Linked List Python Medium
0238 Product of Array Except Self Python Medium
0239 Sliding Window Maximum Python Hard
0240 Search a 2D Matrix II Python Medium
0241 Different Ways to Add Parentheses Python Medium
0242 Valid Anagram Python, C++, JavaScript Easy
0249 Group Shifted Strings Python Medium
0252 Meeting Rooms Python Easy
0253 Meeting Rooms II Python Medium
0255 Verify Preorder Sequence in Binary Search Tree Python Medium
0256 Paint House Python Medium
0259 3Sum Smaller Python Medium
0260 Single Number III Python Medium
0261 Graph Valid Tree Python Medium
0263 Ugly Number Python Easy
0264 Ugly Number II Python Medium
0265 Paint House II Python Hard
0268 Missing Number Python Easy
0269 Alien Dictionary Python Hard
0271 Encode and Decode Strings Python Medium
0273 Integer to English Words Python Hard
0274 H-Index Python Medium
0276 Paint Fence Python Medium
0278 First Bad Version Python, C++ Easy
0279 Perfect Squares Python Medium
0283 Move Zeroes C++ Easy
0285 Inorder Successor in BST Python Medium
0286 Walls and Gates Python Medium
0287 Find the Duplicate Number Python Medium
0290 Word Pattern Python Easy
0291 Word Pattern II Python Medium
0293 Flip Game Python Easy
0295 Find Median from Data Stream Python Hard
0296 Best Meeting Point Python Hard
0297 Serialize and Deserialize Binary Tree Python Hard
0299 Bulls and Cows Python Medium
0300 Longest Increasing Subsequence Python Medium
0304 Range Sum Query 2D - Immutable Python Medium
0305 Number of Islands II Python Hard
0309 Best Time to Buy and Sell Stock with Cooldown Python Medium
0310 Minimum Height Trees Python Medium
0312 Burst Balloons Python Hard
0316 Remove Duplicate Letters Python Hard
0320 Generalized Abbreviation Python Medium
0322 Coin Change Python Medium
0323 Number of Connected Components in an Undirected Graph Python Medium
0328 Odd Even Linked List Python Medium
0329 Longest Increasing Path in a Matrix Python Hard
0330 Patching Array Python Hard
0332 Reconstruct Itinerary Python Medium
0334 Increasing Triplet Subsequence Python Medium
0338 Counting Bits Python Medium
0340 Longest Substring with At Most K Distinct Characters Python Medium
0341 Flatten Nested List Iterator Python Medium
0342 Power of Four Python Easy
0343 Integer Break Python Medium
0344 Reverse String Python, C++ Easy
0345 Reverse Vowels of a String Python Easy
0346 Moving Average from Data Stream Python Easy
0347 Top K Frequent Elements Python Medium
0349 Intersection of Two Arrays Python Easy
0350 Intersection of Two Arrays II Python, C++ Easy
0351 Android Unlock Patterns Python Medium
0355 Design Twitter Python Medium
0358 Rearrange String k Distance Apart Python Hard
0362 Design Hit Counter Python Medium
0366 Find Leaves of Binary Tree Python Medium
0368 Largest Divisible Subset Python Medium
0371 Sum of Two Integers Python Medium
0373 Find K Pairs with Smallest Sums Python Medium
0374 Guess Number Higher or Lower Python Easy
0377 Combination Sum IV Python Medium
0380 Insert Delete GetRandom O(1) Python Medium
0383 Ransom Note Python, C++ Easy
0386 Lexicographical Numbers Python Medium
0387 First Unique Character in a String Python, C++ Easy
0389 Find the Difference Python Easy
0392 Is Subsequence Python Easy
0394 Decode String Python Medium
0399 Evaluate Division Python Medium
0402 Remove K Digits Python Medium
0403 Frog Jump Python Hard
0404 Sum of Left Leaves Python Easy
0409 Longest Palindrome Python Easy
0416 Partition Equal Subset Sum Python Medium
0417 Pacific Atlantic Water Flow Python Medium
0424 Longest Repeating Character Replacement Python Medium
0427 Construct Quad Tree Python Medium
0432 All O`one Data Structure Python Hard
0433 Minimum Genetic Mutation Python Medium
0435 Non-overlapping Intervals Python Medium
0437 Path Sum III Python Medium
0438 Find All Anagrams in a String Python Medium
0439 Ternary Expression Parser Python Medium
0440 K-th Smallest in Lexicographical Order Python Hard
0442 Find All Duplicates in an Array Python Medium
0443 String Compression Python Medium
0446 Arithmetic Slices II - Subsequence Python Hard
0450 Delete Node in a BST Python Medium
0451 Sort Characters By Frequency Python Medium
0452 Minimum Number of Arrows to Burst Balloons Python Medium
0455 Assign Cookies Python Easy
0456 132 Pattern Python Medium
0458 Poor Pigs Python Hard
0459 Repeated Substring Pattern Python Easy
0463 Island Perimeter Python Easy
0473 Matchsticks to Square Python Medium
0476 Number Complement Python Easy
0486 Predict the Winner Python Medium
0487 Max Consecutive Ones II Python Medium
0490 The Maze Python Medium
0494 Target Sum Python Medium
0501 Find Mode in Binary Search Tree Python Easy
0502 IPO Python Hard
0505 The Maze II Python Medium
0506 Relative Ranks Python Easy
0509 Fibonacci Number Python, C++ Easy
0513 Find Bottom Left Tree Value Python Medium
0514 Freedom Trail Python Hard
0515 Find Largest Value in Each Tree Row Python Medium
0516 Longest Palindromic Subsequence Python Medium
0518 Coin Change 2 Python Medium
0523 Continuous Subarray Sum Python Medium
0525 Contiguous Array Python Medium
0528 Random Pick with Weight Python Medium
0530 Minimum Absolute Difference in BST Python Easy
0532 K-diff Pairs in an Array Python Easy
0539 Minimum Time Difference Python Medium
0540 Single Element in a Sorted Array Python Medium
0542 01 Matrix Python, C++ Medium
0543 Diameter of Binary Tree Python Easy
0545 Boundary of Binary Tree Python Medium
0547 Number of Provinces Python Medium
0552 Student Attendance Record II Python Hard
0557 Reverse Words in a String III C++ Easy
0560 Subarray Sum Equals K Python Medium
0561 Array Partition I Python Easy
0564 Find the Closest Palindrome Python Hard
0566 Reshape the Matrix C++ Easy
0567 Permutation in String Python, C++ Medium
0570 Managers with at Least 5 Direct Reports SQL Medium
0572 Subtree of Another Tree Python, Javascript Easy
0573 Squirrel Simulation Python Medium
0576 Out of Boundary Paths Python Medium
0577 Employee Bonus SQL Easy
0584 Find Customer Referee SQL Easy
0588 Design In-Memory File System Python Hard
0590 N-ary Tree Postorder Traversal Python Easy
0592 Fraction Addition and Subtraction Python Medium
0595 Big Countries SQL Easy
0605 Can Place Flowers Python Easy
0606 Construct String from Binary Tree Python Easy
0617 Merge Two Binary Trees C++ Easy
0620 Not Boring Movies SQL Easy
0621 Task Scheduler Python Medium
0623 Add One Row to Tree Python Medium
0624 Maximum Distance in Arrays Python Easy
0629 K Inverse Pairs Array Python Hard
0632 Smallest Range Covering Elements from K Lists Python [Hard](./
0633 Sum of Square Numbers Python Medium
0637 Average of Levels in Binary Tree Python Easy
0641 Design Circular Deque Python Medium
0643 Maximum Average Subarray I Python Easy
0645 Set Mismatch Python Easy
0646 Maximum Length of Pair Chain Python Medium
0647 Palindromic Substrings Python Medium
0648 Replace Words Python Medium
0649 Dota2 Senate Python Medium
0650 2 Keys Keyboard Python Medium
0653 Two Sum IV - Input is a BST C++ Easy
0658 Find K Closest Elements Python Medium
0661 Image Smoother Python Easy
0662 Maximum Width of Binary Tree Python Medium
0664 Strange Printer Python Hard
0666 Path Sum IV Python Medium
0670 Maximum Swap Python Medium
0678 Valid Parenthesis String Python Medium
0684 Redundant Connection Python Medium
0692 Top K Frequent Words Python Medium
0694 Number of Distinct Islands Python Medium
0695 Max Area of Island C++ Medium
0700 Search in a Binary Search Tree C++ Easy
0701 Insert into a Binary Search Tree C++ Medium
0703 Kth Largest Element in a Stream Python Easy
0704 Binary Search Pythoon, C++, Javascript Easy
0706 Design HashMap Python, C++ Easy
0712 Minimum ASCII Delete Sum for Two Strings Python Medium
0713 Subarray Product Less Than K Python Medium
0714 Best Time to Buy and Sell Stock with Transaction Fee Python Medium
0718 Maximum Length of Repeated Subarray Python Medium
0719 Find K-th Smallest Pair Distance Python Hard
0721 Accounts Merge Python Medium
0723 Candy Crush Python Medium
0724 Find Pivot Index Python Easy
0725 Split Linked List in Parts Python Medium
0726 Number of Atoms Python Hard
0729 My Calendar I Python Medium
0731 My Calendar II Python Medium
0733 Flood Fill Python, C++ Easy
0734 Sentence Similarity Python Easy
0735 Asteroid Collision Python Medium
0737 Sentence Similarity II Python Medium
0739 Daily Temperatures Python Medium
0740 Delete and Earn Python Medium
0741 Cherry Pickup Python Hard
0743 Network Delay Time Python Medium
0744 Find Smallest Letter Greater Than Target Python Easy
0746 Min Cost Climbing Stairs Python, C++ Easy
0752 Open the Lock Python Medium
0759 Employee Free Time Python Hard
0767 Reorganize String Python Medium
0776 Split BST Python Medium
0778 Swim in Rising Water Python Hard
0779 K-th Symbol in Grammar Python Medium
0784 Letter Case Permutation C++ Medium
0786 K-th Smallest Prime Fraction Python Medium
0787 Cheapest Flights Within K Stops Python Medium
0790 Domino and Tromino Tiling Python Medium
0791 Custom Sort String Python Medium
0797 All Paths From Source to Target Python Medium
0799 Champagne Tower Python Medium
0808 Soup Servings Python Medium
0815 Bus Routes Python Hard
0823 Binary Trees With Factors Python Medium
0826 Most Profit Assigning Work Python Medium
0834 Sum of Distances in Tree Python Hard
0840 Magic Squares In Grid Python Medium
0841 Keys and Rooms Python Medium
0844 Backspace String Compare Python Easy
0846 Hand of Straights Python Medium
0847 Shortest Path Visiting All Nodes Python Hard
0852 Peak Index in a Mountain Array Python Easy
0857 Minimum Cost to Hire K Workers Python Hard
0860 Lemonade Change Python Easy
0861 Score After Flipping Matrix Python Medium
0863 All Nodes Distance K in Binary Tree Python Medium
0867 Transpose Matrix Python Easy
0872 Leaf-Similar Trees Python Easy
0874 Walking Robot Simulation Python Medium
0875 Koko Eating Bananas Python Medium
0876 Middle of the Linked List Python, C++ Easy
0880 Decoded String at Index Python Medium
0881 Boats to Save People Python Medium
0884 Uncommon Words from Two Sentences Python Easy
0885 Spiral Matrix III Python Medium
0888 Fair Candy Swap Python Easy
0894 All Possible Full Binary Trees Python Medium
0895 Maximum Frequency Stack Python Hard
0896 Monotonic Array Python Easy
0901 Online Stock Span Python Medium
0905 Sort Array By Parity Python Easy
0907 Sum of Subarray Minimums Python Medium
0909 Snakes and Ladders Python Medium
0912 Sort an Array Python Medium
0918 Maximum Sum Circular Subarray Python Medium
0920 Number of Music Playlists Python Hard
0921 Minimum Add to Make Parentheses Valid Python Medium
0924 Minimize Malware Spread Python Hard
0930 Binary Subarrays With Sum Python Medium
0931 Minimum Falling Path Sum Python Medium
0933 Number of Recent Calls Python Easy
0935 Knight Dialer Python Medium
0938 Range Sum of BST Python Easy
0939 Minimum Area Rectangle Python Medium
0945 Minimum Increment to Make Array Unique Python Medium
0947 Most Stones Removed with Same Row or Column Python Medium
0948 Bag of Tokens Python Medium
0950 Reveal Cards In Increasing Order Python Medium
0951 Flip Equivalent Binary Trees Python Medium
0959 Regions Cut By Slashes Python Medium
0962 Maximum Width Ramp Python Medium
0973 K Closest Points to Origin Python Medium
0974 Subarray Sums Divisible by K Python Medium
0977 Squares of a Sorted Array Python, C++ Easy
0979 Distribute Coins in Binary Tree Python Medium
0981 Time Based Key-Value Store Python Medium
0988 Smallest String Starting From Leaf Python Medium
0992 Subarrays with K Different Integers Python Hard
0993 Cousins in Binary Tree Python Easy
0994 Rotting Oranges Python, C++, JavaScript Medium
0995 Minimum Number of K Consecutive Bit Flips Python Hard
0997 Find the Town Judge Python Easy
1002 Find Common Characters Python Easy
1004 Max Consecutive Ones III Python Medium
1010 Pairs of Songs With Total Durations Divisible by 60 Python Medium
1011 Capacity To Ship Packages Within D Days Python Medium
1026 Maximum Difference Between Node and Ancestor Python Medium
1038 Binary Search Tree to Greater Sum Tree Python Medium
1043 Partition Array for Maximum Sum Python Medium
1046 Last Stone Weight Python Easy
1048 Longest String Chain Python Medium
1051 Height Checker Python Easy
1052 Grumpy Bookstore Owner Python Medium
1057 Campus Bikes Python Medium
1060 Missing Element in Sorted Array Python Medium
1062 Longest Repeating Substring Python Medium
1063 Number of Valid Subarrays Python Hard
1066 Campus Bikes II Python Medium
1068 Product Sales Analysis I SQL Easy
1071 Greatest Common Divisor of Strings Python Easy
1074 Number of Submatrices That Sum to Target Python Hard
1075 Project Employees I SQL Easy
1092 Shortest Common Supersequence Python Hard
1095 Find in Mountain Array Python Hard
1099 Two Sum Less Than K Python Easy
1101 The Earliest Moment When Everyone Become Friends Python Medium
1105 Filling Bookcase Shelves Python Medium
1106 Parsing A Boolean Expression Python Hard
1110 Delete Nodes And Return Forest Python Medium
1119 Remove Vowels from a String Python Easy
1120 Maximum Average Subtree Python Medium
1122 Relative Sort Array Python Easy
1133 Largest Unique Number Python Easy
1136 Parallel Courses Python Hard
1137 N-th Tribonacci Number Python, C++ Easy
1140 Stone Game II Python Medium
1143 Longest Common Subsequence Python Medium
1146 Snapshot Array Python Medium
1148 Article Views I SQL Easy
1151 Minimum Swaps to Group All 1's Together Python Medium
1155 Number of Dice Rolls With Target Sum Python Medium
1160 Find Words That Can Be Formed by Characters Python Easy
1161 Maximum Level Sum of a Binary Tree Python Medium
1165 Single Row Keyboard Python Easy
1167 Minimum Cost to Connect Sticks Python Medium
1168 Optimize Water Distribution in a Village Python Hard
1171 Remove Zero Sum Consecutive Nodes from Linked List Python Medium
1183 Maximum Number of Ones Python Hard
1190 Reverse Substrings Between Each Pair of Parentheses Python Medium
1197 Minimum Knight Moves Python Medium
1199 Minimum Time to Build Blocks Python Hard
1202 Smallest String With Swaps Python Medium
1203 Sort Items by Groups Respecting Dependencies Python Hard
1207 Unique Number of Occurrences Python Easy
1208 Get Equal Substrings Within Budget Python Medium
1216 Valid Palindrome III Python Hard
1219 Path with Maximum Gold Python Medium
1220 Count Vowels Permutation Python Hard
1230 Toss Strange Coins Python Medium
1233 Remove Sub-Folders from the Filesystem Python Medium
1235 Maximum Profit in Job Scheduling Python Hard
1239 Maximum Length of a Concatenated String with Unique Characters Python Medium
1245 Tree Diameter Python Medium
1248 Count Number of Nice Subarrays Python Medium
1249 Minimum Remove to Make Valid Parentheses Python Medium
1251 Average Selling Price SQL Easy
1254 Number of Closed Islands Python Medium
1255 Maximum Score Words Formed by Letters Python Hard
1257 Smallest Common Region Python Medium
1265 Print Immutable Linked List in Reverse C++ Medium
1266 Minimum Time Visiting All Points Python Easy
1268 Search Suggestions System Python Medium
1269 Number of Ways to Stay in the Same Place After Some Steps Python Hard
1272 Remove Interval Python Medium
1277 Count Square Submatrices with All Ones Python Medium
1280 Students and Examinations SQL Easy
1282 Group the People Given the Group Size They Belong To Python Medium
1287 Element Appearing More Than 25% In Sorted Array Python Easy
1289 Minimum Falling Path Sum II Python Hard
1291 Sequential Digits Python Medium
1310 XOR Queries of a Subarray Python Medium
1318 Minimum Flips to Make A or B Equal to C Python Medium
1325 Delete Leaves With a Given Value Python Medium
1326 Minimum Number of Taps to Open to Water a Garden Python Hard
1331 Rank Transform of an Array Python Easy
1334 Find the City With the Smallest Number of Neighbors at a Threshold Distance Python Medium
1335 Minimum Difficulty of a Job Schedule Python Hard
1337 The K Weakest Rows in a Matrix Python Easy
1347 Minimum Number of Steps to Make Two Strings Anagram Python Medium
1351 Count Negative Numbers in a Sorted Matrix Python Easy
1356 Sort Integers by The Number of 1 Bits Python Easy
1359 Count All Valid Pickup and Delivery Options Python Hard
1360 Number of Days Between Two Dates Python Easy
1361 Validate Binary Tree Nodes Python Medium
1367 Linked List in Binary Tree Python Medium
1371 Find the Longest Substring Containing Vowels in Even Counts Python Medium
1372 Longest ZigZag Path in a Binary Tree Python Medium
1378 Replace Employee ID With The Unique Identifier SQL Easy
1380 Lucky Numbers in a Matrix Python Easy
1381 Design a Stack With Increment Operation Python Medium
1382 Balance a Binary Search Tree Python Medium
1395 Count Number of Teams Python Medium
1404 Number of Steps to Reduce a Number in Binary Representation to One Python Medium
1405 Longest Happy String Python Medium
1420 Build Array Where You Can Find The Maximum Exactly K Comparisons Python Hard
1422 Maximum Score After Splitting a String Python Easy
1424 Diagonal Traverse II Python Medium
1425 Constrained Subsequence Sum Python Hard
1428 Leftmost Column with at Least a One Python Medium
1429 First Unique Number Python Medium
1431 Kids With the Greatest Number of Candies Python Easy
1436 Destination City Python Easy
1438 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Python Medium
1441 Build an Array With Stack Operations Python Easy
1442 Count Triplets That Can Form Two Arrays of Equal XOR Python Medium
1448 Count Good Nodes in Binary Tree Python Medium
1456 Maximum Number of Vowels in a Substring of Given Length Python Medium
1457 Pseudo-Palindromic Paths in a Binary Tree Python Medium
1458 Max Dot Product of Two Subsequences Python Hard
1460 Make Two Arrays Equal by Reversing Subarrays Python Easy
1463 Cherry Pickup II Python Hard
1464 Maximum Product of Two Elements in an Array Python Easy
1466 Reorder Routes to Make All Paths Lead to the City Zero Python Medium
1469 Find All The Lonely Nodes Python Easy
1470 Shuffle the Array Python Easy
1481 Least Number of Unique Integers after K Removals Python Medium
1482 Minimum Number of Days to Make m Bouquets Python Medium
1489 Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree Python Hard
1493 Longest Subarray of 1's After Deleting One Element Python Medium
1496 Path Crossing Python Easy
1497 Check If Array Pairs Are Divisible by k Python Medium
1508 Range Sum of Sorted Subarray Sums Python Medium
1509 Minimum Difference Between Largest and Smallest Value in Three Moves Python Medium
1512 Number of Good Pairs Python Easy
1514 Path with Maximum Probability Python Medium
1518 Water Bottles Python Easy
1530 Number of Good Leaf Nodes Pairs Python Medium
1531 String Compression II Python Hard
1535 Find the Winner of an Array Game Python Medium
1544 Make The String Great Python Easy
1545 Find Kth Bit in Nth Binary String Python Medium
1550 Three Consecutive Odds Python Medium
1552 Magnetic Force Between Two Balls Python Medium
1561 Maximum Number of Coins You Can Get Python Medium
1568 Minimum Number of Days to Disconnect Island Python Hard
1578 Minimum Deletion Cost to Avoid Repeating Letters Python Medium
1579 Remove Max Number of Edges to Keep Graph Fully Traversable Python Hard
1580 Put Boxes Into the Warehouse II Python Medium
1581 Customer Who Visited but Did Not Make Any Transactions SQL Easy
1582 Special Positions in a Binary Matrix Python Easy
1584 Min Cost to Connect All Points Python Medium
1590 Make Sum Divisible by P Python Medium
1593 Split a String Into the Max Number of Unique Substrings Python Medium
1598 Crawler Log Folder Python Easy
1605 Find Valid Matrix Given Row and Column Sums Python Medium
1608 Special Array With X Elements Greater Than or Equal X Python Easy
1609 Even Odd Tree Python Medium
1611 Minimum One Bit Operations to Make Integers Zero Python Hard
1614 Maximum Nesting Depth of the Parentheses Python Easy
1615 Maximal Network Rank Python Medium
1630 Arithmetic Subarrays Python Medium
1631 Path With Minimum Effort Python Medium
1633 Percentage of Users Attended a Contest SQL Easy
1634 Add Two Polynomials Represented as Linked Lists Python Medium
1636 Sort Array by Increasing Frequency Python Easy
1637 Widest Vertical Area Between Two Points Containing No Points Python Medium
1639 Number of Ways to Form a Target String Given a Dictionary Python Hard
1642 Furthest Building You Can Reach Python Medium
1647 Minimum Deletions to Make Character Frequencies Unique Python Medium
1653 Minimum Deletions to Make String Balanced Python Medium
1657 Determine if Two Strings Are Close Python Medium
1658 Minimum Operations to Reduce X to Zero Python Medium
1660 Correct a Binary Tree Python Medium
1661 Average Time of Process per Machine SQL Easy
1662 Check If Two String Arrays are Equivalent Python Easy
1669 Merge In Between Linked Lists Python Medium
1671 Minimum Number of Removals to Make Mountain Array Python Hard
1679 Max Number of K-Sum Pairs Python Medium
1683 Invalid Tweets SQL Easy
1684 Count the Number of Consistent Strings Python Easy
1685 Sum of Absolute Differences in a Sorted Array Python Medium
1688 Count of Matches in Tournament Python Easy
1700 Number of Students Unable to Eat Lunch Python Easy
1701 Average Waiting Time Python Medium
1704 Determine if String Halves Are Alike Python Easy
1716 Calculate Money in Leetcode Bank Python Easy
1717 Maximum Score From Removing Substrings Python Medium
1721 Swapping Nodes in a Linked List Python Medium
1727 Largest Submatrix With Rearrangements Python Medium
1730 Shortest Path to Get Food Python Medium
1732 Find the Highest Altitude Python Easy
1740 Find Distance in a Binary Tree Python Medium
1743 Restore the Array From Adjacent Pairs Python Medium
1750 Minimum Length of String After Deleting Similar Ends Python Medium
1757 Recyclable and Low Fat Products SQL Medium
1758 Minimum Changes To Make Alternating Binary String Python Easy
1759 Count Number of Homogenous Substrings Python Medium
1768 Merge Strings Alternately Python Easy
1770 Maximum Score from Performing Multiplication Operations Python Hard
1791 Find Center of Star Graph Python Easy
1793 Maximum Score of a Good Subarray Python Hard
1802 Maximum Value at a Given Index in a Bounded Array Python Medium
1804 Implement Trie II (Prefix Tree) Python Medium
1813 Sentence Similarity III Python Medium
1814 Count Nice Pairs in an Array Python Medium
1829 Maximum XOR for Each Query Python Medium
1834 Single-Threaded CPU Python Medium
1836 Remove Duplicates from an Unsorted Linked List Python Medium
1838 Frequency of the Most Frequent Element Python Medium
1845 Seat Reservation Manager Python Medium
1846 Maximum Element After Decreasing and Rearranging Python Medium
1858 Longest Word With All Prefixes Python Medium
1863 Sum of All Subset XOR Totals Python Easy
1870 Minimum Speed to Arrive on Time Python Medium
1877 Minimize Maximum Pair Sum in Array Python Medium
1885 Count Pairs in Two Arrays Python Medium
1887 Reduction Operations to Make the Array Elements Equal Python Medium
1894 Find the Student That Will Replace the Chalk Python Medium
1897 Redistribute Characters to Make All Strings Equal Python Easy
1898 Maximum Number of Removable Characters Python Medium
1899 Merge Triplets to Form Target Triplet Python Medium
1903 Largest Odd Number in String Python Easy
1905 Count Sub Islands Python Medium
1913 Maximum Product Difference Between Two Pairs Python Easy
1915 Number of Wonderful Substrings Python Medium
1920 Build Array from Permutation C++ Easy
1921 Eliminate Maximum Number of Monsters Python Medium
1926 Nearest Exit from Entrance in Maze Python Medium
1930 Unique Length-3 Palindromic Subsequences Python Medium
1934 Confirmation Rate SQL Medium
1937 Maximum Number of Points with Cost Python Medium
1940 Longest Common Subsequence Between Sorted Arrays Python Medium
1942 The Number of the Smallest Unoccupied Chair Python Medium
1945 Sum of Digits of String After Convert Python Easy
1957 Delete Characters to Make Fancy String Python Easy
1963 Minimum Number of Swaps to Make the String Balanced Python Medium
1971 Find if Path Exists in Graph Python Easy
1973 Count Nodes Equal to Sum of Descendants Python Medium
1980 Find Unique Binary String Python Medium
1992 Find All Groups of Farmland Python Medium
2000 Reverse Prefix of Word Python Easy
2002 Maximum Product of the Length of Two Palindromic Subsequences Python Medium
2009 Minimum Number of Operations to Make Array Continuous Python Hard
2013 Detect Squares Python Medium
2022 Convert 1D Array Into 2D Array Python Easy
2028 Find Missing Observations Python Medium
2037 Minimum Number of Moves to Seat Everyone Python Easy
2038 Remove Colored Pieces if Both Neighbors are the Same Color Python Medium
2044 Count Number of Maximum Bitwise OR Subsets Python Medium
2045 Second Minimum Time to Reach Destination Python Hard
2050 Number of Different Integers in a String Python Easy
2053 Kth Distinct String in an Array Python Easy
2058 Find the Minimum and Maximum Number of Nodes Between Critical Points Python Medium
2061 Number of Spaces Cleaning Robot Cleaned Python Medium
2062 Count Vowel Substrings of a String Python Easy
2073 Time Needed to Buy Tickets Python Easy
2083 Substrings That Begin and End With the Same Letter Python Medium
2092 Find All People With Secret Python Hard
2093 Minimum Cost to Reach City With Discounts Python Medium
2095 Delete the Middle Node of a Linked List Python Medium
2096 Step-By-Step Directions From a Binary Tree Node to Another Python Medium
2101 Detonate the Maximum Bombs Python Medium
2108 Find First Palindromic String in the Array Python Medium
2125 Number of Laser Beams in a Bank Python Medium
2130 Maximum Twin Sum of a Linked List Python Medium
2134 Minimum Swaps to Group All 1's Together II Python Medium
2141 Maximum Running Time of N Computers Python Hard
2147 Number of Ways to Divide a Long Corridor Python Hard
2149 Rearrange Array Elements by Sign Python Medium
2181 Merge Nodes in Between Zeros Python Medium
2192 All Ancestors of a Node in a Directed Acyclic Graph Python Medium
2196 Create Binary Tree From Descriptions Python Medium
2215 Find the Difference of Two Arrays Python Easy
2220 Minimum Bit Flips to Convert Number Python Easy
2225 Find Players With Zero or One Losses Python Medium
2251 Number of Flowers in Full Bloom Python Hard
2264 Largest 3-Same-Digit Number in String Python Easy
2265 Count Nodes Equal to Average of Subtree Python Medium
2275 Largest Combination With Bitwise AND Greater Than Zero Python Medium
2285 Maximum Total Importance of Roads Python Medium
2291 Maximum Profit From Trading Stocks Python Medium
2300 Successful Pairs of Spells and Potions Python Medium
2303 Calculate Amount Paid in Taxes Python Easy
2331 Evaluate Boolean Binary Tree Python Easy
2334 Subarray With Elements Greater Than Varying Threshold Python Hard
2336 Smallest Number in Infinite Set Python Medium
2352 Equal Row and Column Pairs Python Medium
2353 Design a Food Rating System Python Medium
2355 Maximum Number of Books You Can Take Python Hard
2361 Minimum Costs Using the Train Line Python Hard
2366 Minimum Replacements to Sort the Array Python Hard
2369 Check If There Is a Valid Partition for the Array Python Medium
2370 Longest Ideal Subsequence Python Medium
2373 Largest Local Values in a Matrix Python Easy
2385 Amount of Time for Binary Tree to be Infected Python Medium
2390 Removing Stars From a String Python Medium
2391 Minimum Amount of Time to Collect Garbage Python Medium
2392 Build a Matrix With Conditions Python Hard
2393 Count Strictly Increasing Subarrays Python Medium
2402 Meeting Rooms III Python Hard
2406 Divide Intervals Into Minimum Number of Groups Python Medium
2416 Sum of Prefix Scores of Strings Python Hard
2418 Sort the People Python Easy
2419 Longest Subarray With Maximum Bitwise AND Python Medium
2433 Find the Original Array of Prefix XOR Python Medium
2439 Minimize Maximum of Array Python Medium
2441 Largest Positive Integer That Exists With Its Negative Python Easy
2444 Count Subarrays with Fixed Bounds Python Hard
2458 Height of Binary Tree After Subtree Removal Queries Python Hard
2462 Total Cost to Hire K Workers Python Medium
2463 Minimum Total Distance Traveled Python Hard
2473 Minimum Cost to Buy Apples Python Medium
2482 Difference Between Ones and Zeros in Row and Column Python Medium
2483 Minimum Penalty for a Shop Python Medium
2485 Find the Pivot Integer Python Easy
2486 Append Characters to String to Make Subsequence Python Medium
2487 Remove Nodes from Linked List Python Medium
2490 Circular Sentence Python Easy
2491 Divide Players Into Teams of Equal Skill Python Medium
2501 Longest Square Streak in an Array Python Medium
2505 Bitwise OR of All Subarrays Python Medium
2530 Maximal Score After Applying K Operations Python Medium
2540 Minimum Common Value Python Easy
2542 Maximum Subsequence Score Python Medium
2582 Pass the Pillow Python Easy
2583 Kth Largest Sum in a Binary Tree Python Medium
2592 Maximize Greatness of an Array Python Medium
2597 The Number of Beautiful Subsets Python Medium
2610 Convert an Array into a 2D Array with Conditions Python Medium
2616 Minimize the Maximum Difference of Pairs Python Medium
2618 Check if Object Instance of Class TypeScript Medium
2619 Array.prototype.last JavaScript, TypeScript Easy
2620 Counter JavaScript, TypeScript Easy
2621 Sleep JavaScript, TypeScript Easy
2622 Cache with Time Limit JavaScript, TypeScript Medium
2623 Memoize JavaScript, TypeScript Medium
2624 Snail Traversal TypeScript Medium
2625 Flatten Deeply Nested Array JavaScript, TypeScript Medium
2626 Array Reduce Transformation JavaScript, TypeScript Easy
2627 Debounce JavaScript, TypeScript Medium
2628 JSON Deep Equal JavaScript, TypeScript Medium
2629 Function Composition JavaScript, TypeScript Easy
2630 Memoize II TypeScript Hard
2631 Group By JavaScript, TypeScript Medium
2632 Curry JavaScript, TypeScript Medium
2633 Convert Object to JSON String JavaScript, TypeScript Medium
2634 Filter Elements from Array JavaScript, TypeScript Easy
2635 Apply Transform over Each Element in Array JavaScript, TypeScript Easy
2636 Promise Pool JavaScript, TypeScript Medium
2637 Promise Time Limit JavaScript, TypeScript Medium
2641 Cousins in Binary Tree II Python Medium
2642 Design Graph with Shortest Path Calculator Python Hard
2648 Generate Fibonacci Sequence TypeScript Easy
2649 Nested Array Generator TypeScript Medium
2650 Design Cancellable Function TypeScript Hard
2664 The Knight's Tour Python Medium
2665 Counter II JavaScript, TypeScript Easy
2666 Allow One Function Call JavaScript, TypeScript Easy
2667 Create Hello World Function JavaScript, TypeScript Easy
2675 Array of Objects to Matrix TypeScript Hard
2676 Throttle JavaScript, TypeScript Medium
2677 Chunk Array JavaScript, TypeScript Easy
2678 Number of Senior Citizens Python Easy
2684 Maximum Number of Moves in a Grid Python Medium
2690 Infinite Method Object TypeScript Easy
2692 Make Object Immutable TypeScript Medium
2694 Event Emitter JavaScript Medium
2695 Array Wrapper JavaScript Easy
2696 Minimum String Length After Removing Substrings Python Easy
2699 Modify Graph Edge Weights Python Hard
2703 Return Length of Arguments Passed JavaScript Easy
2704 To Be or Not To Be JavaScript Easy
2705 Compact Object JavaScript Medium
2706 Buy Two Chocolates Python Easy
2707 Extra Characters in a String Python Medium
2709 Greatest Common Divisor Traversal Python Hard
2715 Execute Cancellable Function with Delay JavaScript Easy
2721 Execute Asynchronous Functions in Parallel JavaScript Medium
2722 Join Two Arrays by ID JavaScript Medium
2723 Add Two Promises JavaScript Easy
2724 Sort By JavaScript Easy
2725 Interval Cancellation JavaScript Easy
2726 Calculator with Method Chaining JavaScript Easy
2727 Is Object Empty JavaScript Easy
2742 Painting the Walls Python Hard
2743 Count Substrings Without Repeating Character Python Medium
2751 Robot Collisions Python Hard
2762 Continuous Subarrays Python Medium
2771 Longest Non-decreasing Subarray From Two Arrays Python Medium
2778 Sum of Squares of Special Elements Python Easy
2784 Check if Array is Good Python Easy
2785 Sort Vowels in a String Python Medium
2788 Split Strings by Separator Python Easy
2789 Largest Element in an Array after Merge Operations Python Medium
2798 Number of Employees Who Met the Target Python Easy
2802 Find the K-th Lucky Number Python Medium
2806 Account Balance after Rounded Purchase Python Easy
2807 Insert Greatest Common Divisors in Linked List Python Medium
2810 Faulty Keyboard Python Easy
2811 Check If It Is Possible to Split Array Python Medium
2812 Find the Safest Path in a Grid Python Medium
2816 Double a Number Represented as a Linked List Python Medium
2824 Count Pairs Whose Sum Is Less Than Target Python Easy
2825 Make String A Subsequence Using Cyclic Increments Python Medium
2833 Furthest Point from Origin Python Easy
2834 Find the Minimum Possible Sum of a Beautiful Array Python Medium
2838 Maximum Coins Heroes Can Collect Python Medium
2849 Determine if a Cell is Reachable at a Given Time Python Medium
2856 Minimum Array Length After Pair Removals Python Medium
2864 Maximum Odd Binary Number Python Easy
2870 Minimum Number of Operations to Make Array Empty Python Medium
2877 Create a DataFrame From List Python Easy
2878 Get the Size of a DataFrame Python Easy
2879 Display the First Three Rows [Python](./2879

About

Explore diverse LeetCode solutions in Python, C++, JavaScript, SQL, and TypeScript. Ideal for interview prep, learning, and code practice in multiple programming languages.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published