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...

hard

1930. Unique Length-3 Palindromic Subsequences

Problem Given a string s, return the number of unique palindromes of length three that are a subsequence of s. Note that even...

medium

3405. Count the Number of Arrays with K Matching Adjacent Elements

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...

hard

628. Maximum Product of Three Numbers

Problem Given an integer array nums, find three numbers whose product is maximum and return the maximum product. https://leet...

easy

674. Longest Continuous Increasing Subsequence

Problem Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (i.e. su...

easy

1128. Number of Equivalent Domino Pairs

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...

easy

1260. Shift 2D Grid

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 ...

easy

1374. Generate a String With Characters That Have Odd Counts

Problem Given an integer n, return a string with n characters such that each character in such string occurs an odd number of...

easy

1437. Check If All 1's Are at Least Length K Places Away

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...

easy

2270. Number of Ways to Split Array

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...

medium

292. Nim Game

Problem You are playing the following Nim Game with your friend: Initially, there is a heap of stones on the table. You and ...

easy

171. Excel Sheet Column Number

Problem Given a string columnTitle that represents the column title as appears in an Excel sheet, return its corresponding co...

easy

168. Excel Sheet Column Title

Problem Given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet. For example: A...

easy

816. Ambiguous Coordinates

Problem We had some 2-dimensional coordinates, like "(1, 3)" or "(2, 0.5)". Then, we removed all commas, ...

medium

436. Find Right Interval

Problem You are given an array of intervals, where intervals[i] = [startᵢ, endᵢ] and each startᵢ is unique. The right interva...

medium

732. My Calendar III

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 ...

hard

731. My Calendar II

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...

medium

581. Shortest Unsorted Continuous Subarray

Problem Given an integer array nums, you need to find one continuous subarray such that if you only sort this subarray in non...

medium

2559. Count Vowel Strings in Ranges

Problem You are given a 0-indexed array of strings words and a 2D array of integers queries. Each query queries[i] = [lᵢ, rᵢ]...

medium

729. My Calendar I

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...

medium

985. Sum of Even Numbers After Queries

Problem You are given an integer array nums and an array queries where queries[i] = [valᵢ, indexᵢ]. For each query i, first, ...

medium

767. Reorganize String

Problem Given a string s, rearrange the characters of s so that any two adjacent characters are not the same. Return any poss...

medium

1765. Map of Highest Peak

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...

medium

542. 01 Matrix

Problem Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell. The distance between two cells ...

medium

1029. Two City Scheduling

Problem A company is planning to interview 2n people. Given the array costs where costs[i] = [aCostᵢ, bCostᵢ], the cost of fl...

medium

1072. Flip Columns For Maximum Number of Equal Rows

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...

medium

382. Linked List Random Node

Problem Given a singly linked list, return a random node’s value from the linked list. Each node must have the same probabili...

medium

221. Maximal Square

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...

medium

1422. Maximum Score After Splitting a String

Problem Given a string s of zeros and ones, return the maximum score after splitting the string into two non-empty substrings...

easy

3280. Convert Date to Binary

Problem You are given a string date representing a Gregorian calendar date in the yyyy-mm-dd format. date can be written in i...

easy

164. Maximum Gap

Problem Given an integer array nums, return the maximum difference between two successive elements in its sorted form. If the...

medium

730. Count Different Palindromic Subsequences

Problem Given a string s, return the number of different non-empty palindromic subsequences in s. Since the answer may be ver...

hard
12349