LeetCode 10xx
LeetCode problems 1000–1099
LeetCode 10xx
| # | Problem | Difficulty | Time | Notes |
|---|---|---|---|---|
| 1000 | Minimum Cost to Merge Stones | 🔴 Hard | 1m 29s | The problem asks us to merge n piles of stones into a single pile u… |
| 1001 | Grid Illumination | 🔴 Hard | 4m 29s | This problem models a very large chessboard-like grid where certain… |
| 1002 | Find Common Characters | 🟢 Easy | 3m 8s | The problem gives us an array of lowercase strings called words. We… |
| 1003 | Check If Word Is Valid After Substitutions | 🟡 Medium | 1m 11s | The problem asks us to determine whether a given string can be cons… |
| 1004 | Max Consecutive Ones III | 🟡 Medium | 1m 33s | This problem asks us to find the length of the longest contiguous s… |
| 1005 | Maximize Sum Of Array After K Negations | 🟢 Easy | 47s | The problem is asking us to maximize the sum of an integer array af… |
| 1006 | Clumsy Factorial | 🟡 Medium | 45s | The problem asks us to compute a clumsy factorial for a given posit… |
| 1007 | Minimum Domino Rotations For Equal Row | 🟡 Medium | 1m 11s | The problem gives us two arrays, tops and bottoms, representing a s… |
| 1008 | Construct Binary Search Tree from Preorder Traversal | 🟡 Medium | 49s | Let's dive deep and construct a thorough technical guide for LeetCo… |
| 1009 | Complement of Base 10 Integer | 🟢 Easy | 48s | This problem asks us to compute the complement of a base-10 integer… |
| 1010 | Pairs of Songs With Total Durations Divisible by 60 | 🟡 Medium | 40s | The problem asks us to find pairs of songs whose total duration is … |
| 1011 | Capacity To Ship Packages Within D Days | 🟡 Medium | 1m 18s | This problem asks us to determine the minimum ship capacity require… |
| 1012 | Numbers With Repeated Digits | 🔴 Hard | 1m 50s | The problem asks us to count how many integers in the range [1, n] … |
| 1013 | Partition Array Into Three Parts With Equal Sum | 🟢 Easy | 2m 30s | The problem gives us an integer array arr and asks whether it can b… |
| 1014 | Best Sightseeing Pair | 🟡 Medium | 44s | The problem presents an array of integers values, where each elemen… |
| 1015 | Smallest Integer Divisible by K | 🟡 Medium | 1m 9s | The problem asks us to find the length of the smallest positive int… |
| 1016 | Binary String With Substrings Representing 1 To N | 🟡 Medium | 55s | The problem asks us to determine whether a given binary string s co… |
| 1017 | Convert to Base -2 | 🟡 Medium | 2m 52s | This problem asks us to convert a non-negative integer n into its r… |
| 1018 | Binary Prefix Divisible By 5 | 🟢 Easy | 2m 19s | The problem presents a binary array nums, where each element is eit… |
| 1019 | Next Greater Node In Linked List | 🟡 Medium | 2m 34s | The problem asks us to process a singly-linked list and, for each n… |
| 1020 | Number of Enclaves | 🟡 Medium | 2m 28s | The problem gives us a binary matrix called grid, where: - 0 repres… |
| 1021 | Remove Outermost Parentheses | 🟢 Easy | 10m 43s | Unusual activity has been detected from your device. Try again late… |
| 1022 | Sum of Root To Leaf Binary Numbers | 🟢 Easy | 1m 15s | This problem gives us the root of a binary tree where every node co… |
| 1023 | Camelcase Matching | 🟡 Medium | 1m 18s | The problem gives us a list of query strings and a target camel cas… |
| 1024 | Video Stitching | 🟡 Medium | 1m 3s | The problem asks us to cover a sporting event that lasts time secon… |
| 1025 | Divisor Game | 🟢 Easy | 2m 31s | The problem describes a two-player turn-based game between Alice an… |
| 1026 | Maximum Difference Between Node and Ancestor | 🟡 Medium | 1m 10s | This problem asks us to find the largest absolute difference betwee… |
| 1027 | Longest Arithmetic Subsequence | 🟡 Medium | 43s | Your requested guide is very long and detailed, especially with all… |
| 1028 | Recover a Tree From Preorder Traversal | 🔴 Hard | 53s | The problem provides a string traversal representing a preorder dep… |
| 1029 | Two City Scheduling | 🟡 Medium | 1m 14s | In this problem, we are given an array called costs, where each ele… |
| 1030 | Matrix Cells in Distance Order | 🟢 Easy | 1m 10s | This problem asks us to return every cell in a matrix, ordered by i… |
| 1031 | Maximum Sum of Two Non-Overlapping Subarrays | 🟡 Medium | 1m 14s | The problem gives us an integer array nums and two fixed subarray l… |
| 1032 | Stream of Characters | 🔴 Hard | 2m 19s | The problem asks us to design a data structure that processes a str… |
| 1033 | Moving Stones Until Consecutive | 🟡 Medium | 49s | The problem presents three stones placed on distinct positions alon… |
| 1034 | Coloring A Border | 🟡 Medium | 1m 11s | The problem gives us a two dimensional grid where each cell contain… |
| 1035 | Uncrossed Lines | 🟡 Medium | 2m 49s | The problem gives us two integer arrays, nums1 and nums2. We are al… |
| 1036 | Escape a Large Maze | 🔴 Hard | 1m 42s | The problem gives us a massive 1,000,000 x 1,000,000 grid. Each cel… |
| 1037 | Valid Boomerang | 🟢 Easy | 48s | This problem asks us to determine whether three given points in a 2… |
| 1038 | Binary Search Tree to Greater Sum Tree | 🟡 Medium | 1m 13s | The problem gives us the root of a Binary Search Tree, abbreviated … |
| 1039 | Minimum Score Triangulation of Polygon | 🟡 Medium | 2m 15s | This problem asks us to triangulate a convex polygon in such a way … |
| 1040 | Moving Stones Until Consecutive II | 🟡 Medium | 47s | The problem gives an array stones representing positions of stones … |
| 1041 | Robot Bounded In Circle | 🟡 Medium | 1m | This problem asks us to determine whether a robot moving on an infi… |
| 1042 | Flower Planting With No Adjacent | 🟡 Medium | 57s | The problem presents n gardens, labeled from 1 to n, and a list of … |
| 1043 | Partition Array for Maximum Sum | 🟡 Medium | 1m 9s | The problem gives us an integer array arr and an integer k. We are … |
| 1044 | Longest Duplicate Substring | 🔴 Hard | 1m | Here is the complete, detailed technical solution guide for LeetCod… |
| 1045 | Customers Who Bought All Products | 🟡 Medium | 1m | This problem asks us to identify all customers who have purchased e… |
| 1046 | Last Stone Weight | 🟢 Easy | 59s | This problem asks us to repeatedly simulate a process involving sto… |
| 1047 | Remove All Adjacent Duplicates In String | 🟢 Easy | 1m 8s | The problem gives us a string s containing only lowercase English l… |
| 1048 | Longest String Chain | 🟡 Medium | 2m 17s | That is a long, structured technical guide that will exceed a pract… |
| 1049 | Last Stone Weight II | 🟡 Medium | 1m 24s | The problem is essentially about simulating the process of repeated… |
| 1050 | Actors and Directors Who Cooperated At Least Three Times | 🟢 Easy | 1m 1s | This problem asks us to identify every (actorid, directorid) pair w… |
| 1051 | Height Checker | 🟢 Easy | 1m 13s | The problem gives us an array called heights, where each value repr… |
| 1052 | Grumpy Bookstore Owner | 🟡 Medium | 2m 32s | This problem asks us to maximize the number of satisfied customers … |
| 1053 | Previous Permutation With One Swap | 🟡 Medium | 1m 19s | The problem asks us to find the lexicographically largest permutati… |
| 1054 | Distant Barcodes | 🟡 Medium | 4m 7s | The problem is asking us to rearrange a list of barcodes so that no… |
| 1055 | Shortest Way to Form String | 🟡 Medium | 1m 16s | The problem asks us to construct the string target using the fewest… |
| 1056 | Confusing Number | 🟢 Easy | 4m 11s | The problem asks us to determine whether a given integer becomes a … |
| 1057 | Campus Bikes | 🟡 Medium | 1m 16s | This problem models a matching process between workers and bikes on… |
| 1058 | Minimize Rounding Error to Meet Target | 🟡 Medium | 41s | The problem asks us to round an array of decimal prices to integers… |
| 1059 | All Paths from Source Lead to Destination | 🟡 Medium | 5m 6s | This problem gives us a directed graph with n nodes labeled from 0 … |
| 1060 | Missing Element in Sorted Array | 🟡 Medium | 42s | The problem asks us to find the k-th missing number in a sorted, st… |
| 1061 | Lexicographically Smallest Equivalent String | 🟡 Medium | 1m 2s | Here is the complete, detailed technical solution guide for LeetCod… |
| 1062 | Longest Repeating Substring | 🟡 Medium | 1m 24s | The problem asks us to find the length of the longest substring tha… |
| 1063 | Number of Valid Subarrays | 🔴 Hard | 57s | The problem is asking us to count the number of valid subarrays in … |
| 1064 | Fixed Point | 🟢 Easy | 55s | The problem is asking us to find a "fixed point" in a sorted array … |
| 1065 | Index Pairs of a String | 🟢 Easy | 1m 21s | The problem gives us a string called text and a list of dictionary … |
| 1066 | Campus Bikes II | 🟡 Medium | 2m 23s | That is a long-form technical guide with multiple required sections… |
| 1067 | Digit Count in Range | 🔴 Hard | 56s | This problem asks us to count how many times a given digit d appear… |
| 1068 | Product Sales Analysis I | 🟢 Easy | 1m 9s | This problem asks us to combine information from two database table… |
| 1069 | Product Sales Analysis II | 🟢 Easy | 2m 51s | This problem asks us to calculate the total quantity sold for each … |
| 1070 | Product Sales Analysis III | 🟡 Medium | 4m 5s | The problem asks us to analyze sales data stored in a Sales table a… |
| 1071 | Greatest Common Divisor of Strings | 🟢 Easy | 1m 26s | The problem asks us to find the greatest common divisor (GCD) of tw… |
| 1072 | Flip Columns For Maximum Number of Equal Rows | 🟡 Medium | 1m 6s | The problem gives us an m x n binary matrix, where every element is… |
| 1073 | Adding Two Negabinary Numbers | 🟡 Medium | 56s | The problem asks us to add two numbers that are represented in nega… |
| 1074 | Number of Submatrices That Sum to Target | 🔴 Hard | 4m 24s | The problem asks us to count how many non-empty rectangular submatr… |
| 1075 | Project Employees I | 🟢 Easy | 54s | This problem provides two database tables, Project and Employee. Th… |
| 1076 | Project Employees II | 🟢 Easy | 1m 19s | This problem asks us to identify the project or projects that have … |
| 1077 | Project Employees III | 🟡 Medium | 43s | The problem asks us to find the most experienced employees in each … |
| 1078 | Occurrences After Bigram | 🟢 Easy | 1m 3s | The problem gives us a string called text and two target words, fir… |
| 1079 | Letter Tile Possibilities | 🟡 Medium | 1m 3s | The problem asks us to count all possible non-empty sequences that … |
| 1080 | Insufficient Nodes in Root to Leaf Paths | 🟡 Medium | 58s | This problem asks us to prune a binary tree by removing insufficien… |
| 1081 | Smallest Subsequence of Distinct Characters | 🟡 Medium | 1m 15s | The problem asks us to construct the lexicographically smallest sub… |
| 1082 | Sales Analysis I | 🟢 Easy | 1m 37s | This problem asks us to identify the seller or sellers who generate… |
| 1083 | Sales Analysis II | 🟢 Easy | 1m 22s | This problem asks us to identify all buyers who purchased the produ… |
| 1084 | Sales Analysis III | 🟢 Easy | 5m 7s | The problem asks us to identify products that were sold only during… |
| 1085 | Sum of Digits in the Minimum Number | 🟢 Easy | 5m 42s | This problem asks us to examine the smallest number in the input ar… |
| 1086 | High Five | 🟢 Easy | 44s | The problem asks us to compute the top five average score for each … |
| 1087 | Brace Expansion | 🟡 Medium | 1m 3s | In this problem, we are given a string that represents multiple pos… |
| 1088 | Confusing Number II | 🔴 Hard | 1m 6s | In this problem, we are given an integer n, and we must count how m… |
| 1089 | Duplicate Zeros | 🟢 Easy | 48s | The problem asks us to modify a fixed-length integer array in-place… |
| 1090 | Largest Values From Labels | 🟡 Medium | 4m 5s | The problem gives us two arrays, values and labels, where each inde… |
| 1091 | Shortest Path in Binary Matrix | 🟡 Medium | 52s | The problem asks us to find the shortest path from the top-left cor… |
| 1092 | Shortest Common Supersequence | 🔴 Hard | 1m 17s | The problem asks us to construct the shortest possible string that … |
| 1093 | Statistics from a Large Sample | 🟡 Medium | 53s | This problem asks us to compute several descriptive statistics-mini… |
| 1094 | Car Pooling | 🟡 Medium | 1m 9s | This problem asks us to determine whether a car can successfully co… |
| 1095 | Find in Mountain Array | 🔴 Hard | 3m 36s | This problem gives us a special type of array called a mountain arr… |
| 1096 | Brace Expansion II | 🔴 Hard | 1m 10s | The problem asks us to interpret a string expression representing a… |
| 1097 | Game Play Analysis V | 🔴 Hard | 1m 1s | This problem requires calculating the day one retention metric for … |
| 1098 | Unpopular Books | 🟡 Medium | 1m 46s | The problem asks us to identify books from a Books table that are c… |
| 1099 | Two Sum Less Than K | 🟢 Easy | 5m 37s | This problem asks us to find the maximum sum of any two distinct nu… |