LeetCode 31xx

LeetCode problems 3100–3199

100 items

LeetCode 31xx

# Problem Difficulty Time Notes
3100 Water Bottles II 🟡 Medium 1m 20s This problem models a bottle exchange process where the exchange ra…
3101 Count Alternating Subarrays 🟡 Medium 1m 51s The problem gives us a binary array nums, meaning every element is …
3102 Minimize Manhattan Distances 🔴 Hard 1m 41s The problem asks us to minimize the maximum Manhattan distance betw…
3103 Find Trending Hashtags II 🔴 Hard 1m 38s The problem gives us a database table named Tweets, where each row …
3104 Find Longest Self-Contained Substring 🔴 Hard 1m 50s The problem asks us to find the longest self-contained substring in…
3105 Longest Strictly Increasing or Strictly Decreasing Subarray 🟢 Easy 1m 59s The problem gives us an integer array nums and asks us to find the …
3106 Lexicographically Smallest String After Operations With Constraint 🟡 Medium 1m 25s This problem asks us to transform a given string s into another str…
3107 Minimum Operations to Make Median of Array Equal to K 🟡 Medium 1m 34s The problem asks us to transform an integer array so that its media…
3108 Minimum Cost Walk in Weighted Graph 🔴 Hard 1m 19s This problem gives us an undirected weighted graph with n vertices …
3109 Find the Index of Permutation 🟡 Medium 1m 20s The problem gives us a permutation perm of the integers [1, 2, ...,…
3110 Score of a String 🟢 Easy 59s This problem asks us to compute the score of a string, where the sc…
3111 Minimum Rectangles to Cover Points 🟡 Medium 1m 13s The problem gives us a collection of 2D points, where each point is…
3112 Minimum Time to Visit Disappearing Nodes 🟡 Medium 1m 1s The problem describes an undirected weighted graph with n vertices,…
3113 Find the Number of Subarrays Where Boundary Elements Are Maximum 🔴 Hard 1m 8s We are given an array nums of positive integers. We need to count h…
3114 Latest Time You Can Obtain After Replacing Characters 🟢 Easy 1m 13s The problem gives us a string representing a time in 12-hour format…
3115 Maximum Prime Difference 🟡 Medium 1m 13s The problem gives us an integer array nums, and we need to find the…
3116 Kth Smallest Amount With Single Denomination Combination 🔴 Hard 1m 2s The problem asks us to determine the kth smallest amount that can b…
3117 Minimum Sum of Values by Dividing Array 🔴 Hard 1m 4s This problem asks us to partition an array nums into exactly m cont…
3118 Friday Purchase III 🟡 Medium 54s This problem asks us to calculate the total amount of money spent b…
3119 Maximum Number of Potholes That Can Be Fixed 🟡 Medium 1m 13s We are given a road represented as a string containing only two cha…
3120 Count the Number of Special Characters I 🟢 Easy 46s The problem asks us to count the number of special characters in a …
3121 Count the Number of Special Characters II 🟡 Medium 1m 12s The problem gives us a string word containing uppercase and lowerca…
3122 Minimum Number of Operations to Satisfy Conditions 🟡 Medium 1m 1s The problem presents a two-dimensional matrix grid of size m x n wi…
3123 Find Edges in Shortest Paths 🔴 Hard 1m 59s The problem gives us an undirected weighted graph with n nodes and …
3124 Find Longest Calls 🟡 Medium 1m 26s This problem asks us to analyze phone call records stored across tw…
3125 Maximum Number That Makes Result of Bitwise AND Zero 🟡 Medium 1m 26s The problem asks us to find the largest integer x such that: - x <=…
3126 Server Utilization Time 🟡 Medium 1m 27s This problem provides a table named Servers that records status cha…
3127 Make a Square with the Same Color 🟢 Easy 1m 13s This problem gives us a fixed 3 x 3 grid containing only two possib…
3128 Right Triangles 🟡 Medium 1m 21s The problem gives us a binary matrix grid, where each cell contains…
3129 Find All Possible Stable Binary Arrays I 🟡 Medium 1m 26s In this problem, we need to count how many binary arrays can be for…
3130 Find All Possible Stable Binary Arrays II 🔴 Hard 1m 23s The problem gives us three integers: - zero, the exact number of 0s…
3131 Find the Integer Added to Array I 🟢 Easy 1m 1s The problem gives us two integer arrays, nums1 and nums2, which hav…
3132 Find the Integer Added to Array II 🟡 Medium 1m 16s We are given two integer arrays, nums1 and nums2. The array nums2 w…
3133 Minimum Array End 🟡 Medium 1m 11s The problem asks us to construct a strictly increasing array nums o…
3134 Find the Median of the Uniqueness Array 🔴 Hard 1m 20s The problem defines a special array called the uniqueness array. Fo…
3135 Equalize Strings by Adding or Removing Characters at Ends 🟡 Medium 1m 20s The problem gives us two strings, initial and target. We want to tr…
3136 Valid Word 🟢 Easy 1m 13s The problem asks us to determine whether a given string qualifies a…
3137 Minimum Number of Operations to Make Word K-Periodic 🟡 Medium 1m The problem asks us to transform a given string word of length n in…
3138 Minimum Length of Anagram Concatenation 🟡 Medium 1m 15s The problem gives us a string s that was formed by concatenating se…
3139 Minimum Cost to Equalize Array 🔴 Hard 58s This problem asks us to determine the minimum cost to make all elem…
3140 Consecutive Available Seats II 🟡 Medium 1m 43s This problem asks us to analyze a cinema seating table and identify…
3141 Maximum Hamming Distances 🔴 Hard 54s The problem asks us to compute the maximum Hamming distance for eac…
3142 Check if Grid Satisfies Conditions 🟢 Easy 1m 9s The problem gives us a two dimensional matrix called grid with m ro…
3143 Maximum Points Inside the Square 🟡 Medium 1m 10s The problem asks us to find the maximum number of points that can b…
3144 Minimum Substring Partition of Equal Character Frequency 🟡 Medium 1m 24s In this problem, we are given a lowercase English string s, and we …
3145 Find Products of Elements of Big Array 🔴 Hard 59s The problem asks us to work with a conceptual infinite array called…
3146 Permutation Difference between Two Strings 🟢 Easy 54s The problem asks us to compute the permutation difference between t…
3147 Taking Maximum Energy From the Mystic Dungeon 🟡 Medium 1m 5s The problem asks us to maximize the total energy gained from a sequ…
3148 Maximum Difference Score in a Grid 🟡 Medium 1m 42s The problem gives us an m x n matrix called grid, where every cell …
3149 Find the Minimum Cost Array Permutation 🔴 Hard 51s The problem presents an array nums of length n that is a permutatio…
3150 Invalid Tweets II 🟢 Easy 1m 10s The problem gives us a database table named Tweets with two columns…
3151 Special Array I 🟢 Easy 1m 2s The problem asks us to determine whether a given integer array is "…
3152 Special Array II 🟡 Medium 1m 22s We are given an integer array nums and several queries. Each query …
3153 Sum of Digit Differences of All Pairs 🟡 Medium 1m 18s The problem asks us to compute the total digit difference across ev…
3154 Find Number of Ways to Reach the K-th Stair 🔴 Hard 1m 8s Let's dive into a comprehensive solution guide for LeetCode 3154 - …
3155 Maximum Number of Upgradable Servers 🟡 Medium 1m 23s The problem requires calculating the maximum number of servers that…
3156 Employee Task Duration and Concurrent Tasks 🔴 Hard 1m 38s The problem gives us a table named Tasks, where each row represents…
3157 Find the Level of Tree with Minimum Sum 🟡 Medium 1m 31s The problem gives us the root of a binary tree, where every node co…
3158 Find the XOR of Numbers Which Appear Twice 🟢 Easy 6m 54s This problem asks us to find all numbers in the array that appear e…
3159 Find Occurrences of an Element in an Array 🟡 Medium 1m 11s The problem gives us three inputs: - An integer array nums - An int…
3160 Find the Number of Distinct Colors Among the Balls 🟡 Medium 1m 23s The problem gives us limit + 1 balls labeled from 0 to limit. Initi…
3161 Block Placement Queries 🔴 Hard 1m 11s The problem involves simulating operations on an infinite number li…
3162 Find the Number of Good Pairs I 🟢 Easy 1m 19s The problem gives us two integer arrays, nums1 and nums2, along wit…
3163 String Compression III 🟡 Medium 1m 11s The problem asks us to implement a specialized string compression a…
3164 Find the Number of Good Pairs II 🟡 Medium 1m 18s We are given two integer arrays, nums1 and nums2, along with a posi…
3165 Maximum Sum of Subsequence With Non-adjacent Elements 🔴 Hard 1m 31s This problem asks us to process a sequence of update queries on an …
3166 Calculate Parking Fees and Duration 🟡 Medium 1m 18s This problem asks us to analyze parking transaction records and com…
3167 Better Compression of String 🟡 Medium 1m 19s The problem gives us a compressed string where every character is i…
3168 Minimum Number of Chairs in a Waiting Room 🟢 Easy 1m 13s The problem gives us a string s that represents events happening in…
3169 Count Days Without Meetings 🟡 Medium 1m 22s The problem gives us a total number of working days, numbered from …
3170 Lexicographically Minimum String After Removing Stars 🟡 Medium 48s The problem asks us to transform a string s that may contain the ''…
3171 Find Subarray With Bitwise OR Closest to K 🔴 Hard 58s The problem asks us to find a subarray within a given array nums su…
3172 Second Day Verification 🟢 Easy 52s The problem requires identifying users who verified their signup ex…
3173 Bitwise OR of Adjacent Elements 🟢 Easy 1m 6s The problem gives us an integer array nums of length n. We must cre…
3174 Clear Digits 🟢 Easy 1m 1s In this problem, we are given a string s that contains lowercase En…
3175 Find The First Player to win K Games in a Row 🟡 Medium 1m 6s The problem describes a competition where players stand in a queue …
3176 Find the Maximum Length of a Good Subsequence I 🟡 Medium 1m 24s We are given an integer array nums and a non-negative integer k. We…
3177 Find the Maximum Length of a Good Subsequence II 🔴 Hard 1m 23s We are given an integer array nums and a non-negative integer k. We…
3178 Find the Child Who Has the Ball After K Seconds 🟢 Easy 52s The problem asks us to simulate a game in which n children, numbere…
3179 Find the N-th Value After K Seconds 🟡 Medium 1m 1s The problem requires computing the value of the last element in an …
3180 Maximum Total Reward Using Operations I 🟡 Medium 1m 2s The problem asks us to maximize a running total reward by selecting…
3181 Maximum Total Reward Using Operations II 🔴 Hard 1m 29s The problem gives us an array rewardValues, where each element repr…
3182 Find Top Scoring Students 🟡 Medium 1m 30s The problem gives us three relational database tables: - students, …
3183 The Number of Ways to Make the Sum 🟡 Medium 1m 5s The problem asks us to determine the number of distinct ways to sum…
3184 Count Pairs That Form a Complete Day I 🟢 Easy 56s The problem asks us to find all pairs of indices (i, j) in an array…
3185 Count Pairs That Form a Complete Day II 🟡 Medium 46s The problem asks us to count pairs of elements in an integer array …
3186 Maximum Total Damage With Spell Casting 🟡 Medium 1m 22s The problem gives us an array power, where each element represents …
3187 Peaks in Array 🔴 Hard 1m 29s The problem asks us to process two kinds of operations on an intege…
3188 Find Top Scoring Students II 🔴 Hard 1m 18s This problem asks us to identify students who satisfy a combination…
3189 Minimum Moves to Get a Peaceful Board 🟡 Medium 1m 7s In this problem, we are given the positions of n rooks placed on an…
3190 Find Minimum Operations to Make All Elements Divisible by Three 🟢 Easy 1m 12s The problem gives us an integer array nums. In one operation, we ar…
3191 Minimum Operations to Make Binary Array Elements Equal to One I 🟡 Medium 1m 33s We are given a binary array nums consisting only of 0s and 1s. We a…
3192 Minimum Operations to Make Binary Array Elements Equal to One II 🟡 Medium 51s This problem asks us to take a binary array nums, which contains on…
3193 Count the Number of Inversions 🔴 Hard 1m 33s The problem asks us to count how many permutations of the numbers […
3194 Minimum Average of Smallest and Largest Elements 🟢 Easy 1m 3s The problem gives us an even-length integer array nums. We repeated…
3195 Find the Minimum Area to Cover All Ones I 🟡 Medium 58s The problem asks us to find the smallest rectangle that covers all …
3196 Maximize Total Cost of Alternating Subarrays 🟡 Medium 3m 29s The problem gives us an integer array nums, and we must divide the …
3197 Find the Minimum Area to Cover All Ones II 🔴 Hard 1m 31s The problem gives us a binary matrix grid, where each cell contains…
3198 Find Cities in Each State 🟢 Easy 1m 31s This problem provides a database table named cities, where each row…
3199 Count Triplets with Even XOR Set Bits I 🟢 Easy 1m 18s The problem gives us three integer arrays, a, b, and c. We must cou…