1980. Find Unique Binary String

Problem Given an array of strings nums containing n unique binary strings each of length n, return a binary string of length ...

medium

2595. Number of Even and Odd Bits

Problem You are given a positive integer n. Let even denote the number of even indices in the binary representation of n with...

easy

2944. Minimum Number of Coins for Fruits

Problem You are given an 0-indexed integer array prices where prices[i] denotes the number of coins needed to purchase the (i...

medium

1415. The k-th Lexicographical String of All Happy Strings of Length n

Problem A happy string is a string that: consists only of letters of the set ['a', 'b', 'c']. s[i] != s[i + 1] for all value...

medium

624. Maximum Distance in Arrays

Problem You are given m arrays, where each array is sorted in ascending order. You can pick up two integers from two differen...

medium

2375. Construct Smallest Number From DI String

Problem You are given a 0-indexed string pattern of length n consisting of the characters 'I' meaning increasing and 'D' mean...

medium

2080. Range Frequency Queries

Problem Design a data structure to find the frequency of a given value in a given subarray. The frequency of a value in a sub...

medium

1079. Letter Tile Possibilities

Problem You have n tiles, where each tile has one letter tiles[i] printed on it. Return the number of possible non-empty sequ...

medium

1287. Element Appearing More Than 25% In Sorted Array

Problem Given an integer array sorted in non-decreasing order, there is exactly one integer in the array that occurs more tha...

easy

1718. Construct the Lexicographically Largest Valid Sequence

Problem Given an integer n, find a sequence that satisfies all of the following: The integer 1 occurs once in the sequence. ...

medium

1299. Replace Elements with Greatest Element on Right Side

Problem Given an array arr, replace every element in that array with the greatest element among the elements to its right, an...

easy

2698. Find the Punishment Number of an Integer

Problem Given a positive integer n, return the punishment number of n. The punishment number of n is defined as the sum of th...

medium

1706. Where Will the Ball Fall

Problem You have a 2-D grid of size m x n representing a box, and you have n balls. The box is open on the top and bottom sid...

medium

1352. Product of the Last K Numbers

Problem Design an algorithm that accepts a stream of integers and retrieves the product of the last k integers of the stream....

medium

1552. Magnetic Force Between Two Balls

Problem In the universe Earth C-137, Rick discovered a special form of magnetic force between two balls if they are put in hi...

medium

1742. Maximum Number of Balls in a Box

Problem You are working in a ball factory where you have n balls numbered from lowLimit up to highLimit inclusive (i.e., n ==...

easy

2342. Max Sum of a Pair With Equal Sum of Digits

Problem You are given a 0-indexed array nums consisting of positive integers. You can choose two indices i and j, such that i...

medium

1728. Cat and Mouse II

Problem A game is played by a cat and a mouse named Cat and Mouse. The environment is represented by a grid of size rows x co...

hard

1910. Remove All Occurrences of a Substring

Problem Given two strings s and part, perform the following operation on s until all occurrences of the substring part are re...

medium

3174. Clear Digits

Problem You are given a string s. Your task is to remove all digits by doing this operation repeatedly: Delete the first dig...

easy

2364. Count Number of Bad Pairs

Problem You are given a 0-indexed integer array nums. A pair of indices (i, j) is a bad pair if i < j and j - i != nums[j]...

medium

80. Remove Duplicates from Sorted Array II

Problem Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique ele...

medium

26. Remove Duplicates from Sorted Array

Problem Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique elem...

easy

2349. Design a Number Container System

Problem Design a number container system that can do the following: Insert or Replace a number at the given index in the sys...

medium

63. Unique Paths II

Problem You are given an m x n integer array grid. There is a robot initially located at the top-left corner (i.e., grid[0][0...

medium

3160. Find the Number of Distinct Colors Among the Balls

Problem You are given an integer limit and a 2D array queries of size n x 2. There are limit + 1 balls with distinct labels i...

medium

59. Spiral Matrix II

Problem Given a positive integer n, generate an n x n matrix filled with elements from 1 to n² in spiral order. https://leetc...

easy

47. Permutations II

Problem Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any or...

easy

1726. Tuple with Same Product

Problem Given an array nums of distinct positive integers, return the number of tuples (a, b, c, d) such that a * b = c * d w...

medium

46. Permutations

Problem Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any orde...

easy

1790. Check if One String Swap Can Make Strings Equal

Problem You are given two strings s1 and s2 of equal length. A string swap is an operation where you choose two indices in a ...

easy

90. Subsets II

Problem Given an integer array nums that may contain duplicates, return all possible subsets (the power set). A subset of an...

easy
12311