3398. Smallest Substring With Identical Characters I
Problem You are given a binary string s of length n and an integer numOps. You are allowed to perform the following operation...
Problem You are given a binary string s of length n and an integer numOps. You are allowed to perform the following operation...
Problem Given a string s, return the number of unique palindromes of length three that are a subsequence of s. Note that even...
Problem You are given three integers n, m, k. A good array arr of size n is defined as follows: Each element in arr is in th...
Problem Given an integer array nums, find three numbers whose product is maximum and return the maximum product. https://leet...
Problem Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (i.e. su...
Problem Given a list of dominoes, dominoes[i] = [a, b] is equivalent to dominoes[j] = [c, d] if and only if either (a == c an...
Problem Given a 2D grid of size m x n and an integer k. You need to shift the grid k times. In one shift operation: Element ...
Problem Given an integer n, return a string with n characters such that each character in such string occurs an odd number of...
Problem Given an binary array nums and an integer k, return true if all 1’s are at least k places away from each other, other...
Problem You are given a 0-indexed integer array nums of length n. nums contains a valid split at index i if the following are...
Problem You are playing the following Nim Game with your friend: Initially, there is a heap of stones on the table. You and ...
Problem Given a string columnTitle that represents the column title as appears in an Excel sheet, return its corresponding co...
Problem Given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet. For example: A...
Problem We had some 2-dimensional coordinates, like "(1, 3)" or "(2, 0.5)". Then, we removed all commas, ...
Problem You are given an array of intervals, where intervals[i] = [startᵢ, endᵢ] and each startᵢ is unique. The right interva...
Problem A k-booking happens when k events have some non-empty intersection (i.e., there is some time that is common to all k ...
Problem You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a t...
Problem Given an integer array nums, you need to find one continuous subarray such that if you only sort this subarray in non...
Problem You are given a 0-indexed array of strings words and a 2D array of integers queries. Each query queries[i] = [lᵢ, rᵢ]...
Problem You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a d...
Problem You are given an integer array nums and an array queries where queries[i] = [valᵢ, indexᵢ]. For each query i, first, ...
Problem Given a string s, rearrange the characters of s so that any two adjacent characters are not the same. Return any poss...
Problem You are given an integer matrix isWater of size m x n that represents a map of land and water cells. If isWater[i][j...
Problem Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell. The distance between two cells ...
Problem A company is planning to interview 2n people. Given the array costs where costs[i] = [aCostᵢ, bCostᵢ], the cost of fl...
Problem You are given an m x n binary matrix matrix. You can choose any number of columns in the matrix and flip every cell i...
Problem Given a singly linked list, return a random node’s value from the linked list. Each node must have the same probabili...
Problem Given an m x n binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area...
Problem Given a string s of zeros and ones, return the maximum score after splitting the string into two non-empty substrings...
Problem You are given a string date representing a Gregorian calendar date in the yyyy-mm-dd format. date can be written in i...
Problem Given an integer array nums, return the maximum difference between two successive elements in its sorted form. If the...
Problem Given a string s, return the number of different non-empty palindromic subsequences in s. Since the answer may be ver...