LeetCode 00xx
LeetCode problems 1–99
LeetCode 00xx
| # | Problem | Difficulty | Time | Notes |
|---|---|---|---|---|
| 1 | Two Sum | 🟢 Easy | 4m | The problem gives us an integer array called nums and another integ… |
| 2 | Add Two Numbers | 🟡 Medium | 2m 35s | The problem gives us two non empty singly linked lists. Each linked… |
| 3 | Longest Substring Without Repeating Characters | 🟡 Medium | 1m 9s | The problem gives a string s and asks for the length of the longest… |
| 4 | Median of Two Sorted Arrays | 🔴 Hard | 1m 25s | The problem gives two individually sorted integer arrays, nums1 and… |
| 5 | Longest Palindromic Substring | 🟡 Medium | 3m 13s | The problem asks us to find the longest substring of a given string… |
| 6 | Zigzag Conversion | 🟡 Medium | 1m 31s | The problem asks us to transform a string into a zigzag pattern acr… |
| 7 | Reverse Integer | 🟡 Medium | 1m 15s | The problem asks us to reverse the digits of a signed 32-bit intege… |
| 8 | String to Integer (atoi) | 🟡 Medium | 1m 52s | The problem asks us to implement a simplified version of the C/C++ … |
| 9 | Palindrome Number | 🟢 Easy | 1m 47s | The problem asks us to determine whether a given integer reads the … |
| 10 | Regular Expression Matching | 🔴 Hard | 6m 5s | LeetCode 10, Regular Expression Matching, asks us to determine whet… |
| 11 | Container With Most Water | 🟡 Medium | 1m 11s | The problem gives an array called height, where each element repres… |
| 12 | Integer to Roman | 🟡 Medium | 1m 27s | The problem asks us to convert a positive integer into its Roman nu… |
| 13 | Roman to Integer | 🟢 Easy | 1m 11s | The problem gives a Roman numeral string and asks us to convert it … |
| 14 | Longest Common Prefix | 🟢 Easy | 1m 24s | The problem gives an array of strings and asks us to find the longe… |
| 15 | 3Sum | 🟡 Medium | 1m 43s | The problem gives us an integer array nums, and we need to find eve… |
| 16 | 3Sum Closest | 🟡 Medium | 1m 12s | The problem gives us an integer array nums and a target integer tar… |
| 17 | Letter Combinations of a Phone Number | 🟡 Medium | 3m 42s | The problem gives a string of digits where each digit is between 2 … |
| 18 | 4Sum | 🟡 Medium | 2m 28s | We are given an integer array nums and an integer target. The goal … |
| 19 | Remove Nth Node From End of List | 🟡 Medium | 1m 7s | This problem asks us to remove the nth node counted from the end of… |
| 20 | Valid Parentheses | 🟢 Easy | 1m 6s | The problem gives a string containing only six possible characters:… |
| 21 | Merge Two Sorted Lists | 🟢 Easy | 2m 51s | This problem asks us to merge two already sorted singly linked list… |
| 22 | Generate Parentheses | 🟡 Medium | 1m 18s | The problem asks us to generate every possible valid combination of… |
| 23 | Merge k Sorted Lists | 🔴 Hard | 1m 14s | The problem gives us an array of k sorted linked lists. Each linked… |
| 24 | Swap Nodes in Pairs | 🟡 Medium | 2m 58s | The problem gives us the head of a singly linked list and asks us t… |
| 25 | Reverse Nodes in k-Group | 🔴 Hard | 1m 46s | This problem asks us to reverse a singly linked list in groups of s… |
| 26 | Remove Duplicates from Sorted Array | 🟢 Easy | 1m 55s | The problem gives us a sorted integer array nums in non-decreasing … |
| 27 | Remove Element | 🟢 Easy | 1m 3s | The problem gives us an integer array nums and a target value val. … |
| 28 | Find the Index of the First Occurrence in a String | 🟢 Easy | 5m 54s | This problem asks us to locate the first occurrence of one string i… |
| 29 | Divide Two Integers | 🟡 Medium | 1m 29s | The problem asks us to implement integer division without using the… |
| 30 | Substring with Concatenation of All Words | 🔴 Hard | 1m 1s | The problem asks us to find all starting indices in a string s wher… |
| 31 | Next Permutation | 🟡 Medium | 1m 8s | The problem asks us to modify an integer array so that it becomes t… |
| 32 | Longest Valid Parentheses | 🔴 Hard | 1m 6s | The problem asks us to find the length of the longest contiguous su… |
| 33 | Search in Rotated Sorted Array | 🟡 Medium | 1m 14s | The problem gives us an array that was originally sorted in ascendi… |
| 34 | Find First and Last Position of Element in Sorted Array | 🟡 Medium | 1m 9s | The problem gives us a sorted integer array nums and a target value… |
| 35 | Search Insert Position | 🟢 Easy | 1m 5s | The problem gives us a sorted array of distinct integers and a targ… |
| 36 | Valid Sudoku | 🟡 Medium | 1m 21s | This problem asks us to validate whether a partially filled Sudoku … |
| 37 | Sudoku Solver | 🔴 Hard | 1m 30s | The problem asks us to build a complete Sudoku solver. We are given… |
| 38 | Count and Say | 🟡 Medium | 1m 10s | The problem asks us to generate the nth term of the "count-and-say"… |
| 39 | Combination Sum | 🟡 Medium | 1m 3s | This problem asks us to generate every possible unique combination … |
| 40 | Combination Sum II | 🟡 Medium | 1m 28s | This problem asks us to find all unique combinations of numbers fro… |
| 41 | First Missing Positive | 🔴 Hard | 1m 24s | The problem asks us to find the smallest positive integer that does… |
| 42 | Trapping Rain Water | 🔴 Hard | 1m 25s | The problem gives an array called height, where each element repres… |
| 43 | Multiply Strings | 🟡 Medium | 1m 33s | The problem asks us to multiply two non-negative integers where eac… |
| 44 | Wildcard Matching | 🔴 Hard | 1m 36s | This problem asks us to determine whether an entire input string s … |
| 45 | Jump Game II | 🟡 Medium | 1m 5s | The problem gives an array nums where each value represents the max… |
| 46 | Permutations | 🟡 Medium | 1m 15s | The problem gives us an array of distinct integers called nums, and… |
| 47 | Permutations II | 🟡 Medium | 1m 44s | The problem asks us to generate every possible permutation of the g… |
| 48 | Rotate Image | 🟡 Medium | 1m 26s | The problem gives us an n x n square matrix that represents an imag… |
| 49 | Group Anagrams | 🟡 Medium | 1m 38s | The problem asks us to group together all strings that are anagrams… |
| 50 | Pow(x, n) | 🟡 Medium | 1m 26s | The problem asks us to implement exponentiation manually, specifica… |
| 51 | N-Queens | 🔴 Hard | 3m 41s | The N-Queens problem asks us to place n queens on an n x n chessboa… |
| 52 | N-Queens II | 🔴 Hard | 1m 7s | The n-queens puzzle asks us to place n queens on an n x n chessboar… |
| 53 | Maximum Subarray | 🟡 Medium | 1m 2s | The problem gives an integer array nums and asks us to find a conti… |
| 54 | Spiral Matrix | 🟡 Medium | 1m 8s | The problem gives an m x n matrix and asks us to return all element… |
| 55 | Jump Game | 🟡 Medium | 1m 44s | The problem gives us an integer array nums, where each value repres… |
| 56 | Merge Intervals | 🟡 Medium | 1m 30s | The problem gives an array of intervals, where each interval is rep… |
| 57 | Insert Interval | 🟡 Medium | 1m 15s | The problem gives us a list of intervals that are already sorted by… |
| 58 | Length of Last Word | 🟢 Easy | 1m 14s | The problem gives us a string s that contains English letters and s… |
| 59 | Spiral Matrix II | 🟡 Medium | 1m 34s | The problem asks us to generate an n x n matrix and fill it with nu… |
| 60 | Permutation Sequence | 🔴 Hard | 5m 16s | The problem gives us the numbers from 1 to n, and asks us to find t… |
| 61 | Rotate List | 🟡 Medium | 1m 11s | This problem asks us to rotate a singly linked list to the right by… |
| 62 | Unique Paths | 🟡 Medium | 1m 3s | The problem describes a robot moving on a rectangular m x n grid. T… |
| 63 | Unique Paths II | 🟡 Medium | 1m 22s | This problem asks us to count how many different valid paths exist … |
| 64 | Minimum Path Sum | 🟡 Medium | 2m 24s | The problem gives us a two dimensional grid of size m x n, where ea… |
| 65 | Valid Number | 🔴 Hard | 2m 46s | This is a comprehensive, multi section technical guide that will be… |
| 66 | Plus One | 🟢 Easy | 2m 21s | The problem gives us a non-empty array of digits that together repr… |
| 67 | Add Binary | 🟢 Easy | 2m 25s | You are given two strings, a and b, where each string represents a … |
| 68 | Text Justification | 🔴 Hard | 1m 23s | This problem asks us to simulate how text is formatted in a text ed… |
| 69 | Sqrt(x) | 🟢 Easy | 57s | The problem asks us to compute the integer square root of a non neg… |
| 70 | Climbing Stairs | 🟢 Easy | 1m 8s | The problem describes a staircase with n total steps. You start at … |
| 71 | Simplify Path | 🟡 Medium | 1m 1s | The problem gives us an absolute Unix-style file path and asks us t… |
| 72 | Edit Distance | 🟡 Medium | 1m 37s | The problem asks us to compute the minimum number of edit operation… |
| 73 | Set Matrix Zeroes | 🟡 Medium | 1m 27s | The problem gives us a two dimensional matrix of integers with m ro… |
| 74 | Search a 2D Matrix | 🟡 Medium | 1m 36s | This problem gives us a two dimensional matrix with two very import… |
| 75 | Sort Colors | 🟡 Medium | 6m 34s | This problem asks us to sort an array that contains only three dist… |
| 76 | Minimum Window Substring | 🔴 Hard | 1m 30s | The problem asks us to find the smallest contiguous substring insid… |
| 77 | Combinations | 🟡 Medium | 1m 3s | This problem asks us to generate all possible combinations of size … |
| 78 | Subsets | 🟡 Medium | 2m 23s | This problem asks us to generate every possible subset of a given a… |
| 79 | Word Search | 🟡 Medium | 2m 21s | In this problem, we are given a two dimensional grid of characters … |
| 80 | Remove Duplicates from Sorted Array II | 🟡 Medium | 4m 7s | This problem asks us to modify a sorted integer array in-place so t… |
| 81 | Search in Rotated Sorted Array II | 🟡 Medium | 1m 10s | This problem asks us to determine whether a target value exists ins… |
| 82 | Remove Duplicates from Sorted List II | 🟡 Medium | 1m 11s | This problem asks us to process a sorted singly linked list and rem… |
| 83 | Remove Duplicates from Sorted List | 🟢 Easy | 4m 18s | This problem asks us to remove duplicate values from a sorted singl… |
| 84 | Largest Rectangle in Histogram | 🔴 Hard | 1m 12s | This problem asks us to find the largest rectangular area that can … |
| 85 | Maximal Rectangle | 🔴 Hard | 1m 23s | The problem asks us to find the area of the largest rectangle conta… |
| 86 | Partition List | 🟡 Medium | 42s | It looks like you want the full detailed solution guide, but the sp… |
| 87 | Scramble String | 🔴 Hard | 2m 21s | This problem asks us to determine whether one string can be transfo… |
| 88 | Merge Sorted Array | 🟢 Easy | 1m 33s | This problem gives us two arrays, nums1 and nums2, where both array… |
| 89 | Gray Code | 🟡 Medium | 3m 16s | The problem asks us to generate a valid Gray code sequence for a gi… |
| 90 | Subsets II | 🟡 Medium | 1m 22s | The problem asks us to generate every possible subset of a given in… |
| 91 | Decode Ways | 🟡 Medium | 1m 21s | This problem asks us to determine how many different valid ways a n… |
| 92 | Reverse Linked List II | 🟡 Medium | 1m 9s | This problem asks us to reverse only a specific portion of a singly… |
| 93 | Restore IP Addresses | 🟡 Medium | 1m 19s | The problem asks us to take a string containing only digits and det… |
| 94 | Binary Tree Inorder Traversal | 🟢 Easy | 1m 17s | This problem asks us to perform an inorder traversal on a binary tr… |
| 95 | Unique Binary Search Trees II | 🟡 Medium | 36s | The problem asks us to generate all structurally unique binary sear… |
| 96 | Unique Binary Search Trees | 🟡 Medium | 1m 8s | This problem asks us to determine how many structurally different B… |
| 97 | Interleaving String | 🟡 Medium | 1m 27s | This problem asks us to determine whether a string s3 can be formed… |
| 98 | Validate Binary Search Tree | 🟡 Medium | 1m 10s | This problem asks us to determine whether a given binary tree satis… |
| 99 | Recover Binary Search Tree | 🟡 Medium | 1m 12s | The problem gives us the root of a binary search tree, but exactly … |