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...
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...
Problem Given two strings s and part, perform the following operation on s until all occurrences of the substring part are re...
Problem You are given a string s. Your task is to remove all digits by doing this operation repeatedly: Delete the first dig...
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]...
Problem Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique ele...
Problem Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique elem...
Problem Design a number container system that can do the following: Insert or Replace a number at the given index in the sys...
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...
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...
Problem Given a positive integer n, generate an n x n matrix filled with elements from 1 to n² in spiral order. https://leetc...
Problem Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any or...
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...
Problem Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any orde...
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 ...
Problem Given an integer array nums that may contain duplicates, return all possible subsets (the power set). A subset of an...
Problem Given an integer array nums of unique elements, return all possible subsets (the power set). A subset of an array is...
Problem Given an array of positive integers nums, return the maximum possible sum of an ascending subarray in nums. A subarra...
Problem Given an array of integers nums, half of the integers in nums are odd, and the other half are even. Sort the array so...
Problem Given an integer array nums, move all the even integers at the beginning of the array followed by all the odd integer...
Problem You are given an array of integers nums. Return the length of the longest subarray of nums which is either strictly i...
Problem Given a string s, return true if the s can be palindrome after deleting at most one character from it. https://leetco...
Problem Given an array nums, return true if the array was originally sorted in non-decreasing order, then rotated some number...
Problem You are given an m x n matrix M initialized with all 0’s and an array of operations ops, where ops[i] = [aᵢ, bᵢ] mean...
Problem There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values). Before being pa...
Problem You are given an n x n binary matrix grid. You are allowed to change at most one 0 to be 1. Return the size of the la...
Problem Given a string s and an integer k, reverse the first k characters for every 2k characters counting from the start of ...
Problem Write a function that reverses a string. The input string is given as an array of characters s. You must do this by m...
Problem Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appe...
Problem Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be u...
Problem Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such...
Problem Given an integer numRows, return the first numRows of Pascal’s triangle. In Pascal’s triangle, each number is the sum...
Problem You are given a 0-indexed 2D matrix grid of size m x n, where (r, c) represents: A land cell if grid[r][c] = 0, or A...