摘要:
You are given an integer array nums and an integer k. You are allowed to perform the following operation on each element of the array at most once: Ad 阅读全文
摘要:
You are given a 0-indexed string array words, where words[i] consists of lowercase English letters. In one operation, select any index i such that 0 < 阅读全文
摘要:
You are given a 0-indexed string blocks of length n, where blocks[i] is either 'W' or 'B', representing the color of the ith block. The characters 'W' 阅读全文
摘要:
There are numBottles water bottles that are initially full of water. You can exchange numExchange empty water bottles from the market with one full wa 阅读全文
摘要:
A spreadsheet is a grid with 26 columns (labeled from 'A' to 'Z') and a given number of rows. Each cell in the spreadsheet can hold an integer value b 阅读全文
摘要:
There is a task management system that allows users to manage their tasks, each associated with a priority. The system should efficiently handle addin 阅读全文
摘要:
There is a malfunctioning keyboard where some letter keys do not work. All other keys on the keyboard work properly. Given a string text of words sepa 阅读全文
摘要:
Given an m x n binary matrix mat, return the number of submatrices that have all ones. Example 1: Input: mat = [[1,0,1],[1,1,0],[1,1,0]] Output: 13 Ex 阅读全文
摘要:
Given an integer array nums, find the maximum possible bitwise OR of a subset of nums and return the number of different non-empty subsets with the ma 阅读全文
摘要:
You are given a 0-indexed integer array nums. An index i is part of a hill in nums if the closest non-equal neighbors of i are smaller than nums[i]. S 阅读全文
摘要:
You are given an array routes representing bus routes where routes[i] is a bus route that the ith bus repeats forever. For example, if routes[0] = [1, 阅读全文
摘要:
A critical point in a linked list is defined as either a local maxima or a local minima. A node is a local maxima if the current node has a value stri 阅读全文
摘要:
You are given an integer array nums. A subsequence sub of nums with length x is called valid if it satisfies: (sub[0] + sub[1]) % 2 == (sub[1] + sub[2 阅读全文
摘要:
A word is considered valid if: It contains a minimum of 3 characters. It contains only digits (0-9), and English letters (uppercase and lowercase). It 阅读全文
摘要:
You are given a 0-indexed integer array players, where players[i] represents the ability of the ith player. You are also given a 0-indexed integer arr 阅读全文
摘要:
Alice is attempting to type a specific string on her computer. However, she tends to be clumsy and may press a key for too long, resulting in a charac 阅读全文
摘要:
You are given a 0-indexed integer array nums and two integers key and k. A k-distant index is an index i of nums for which there exists at least one i 阅读全文
摘要:
A string s can be partitioned into groups of size k using the following procedure: The first group consists of the first k characters of the string, t 阅读全文
摘要:
You are given an integer array nums and an integer k. You may partition nums into one or more subsequences such that each element in nums appears in e 阅读全文
摘要:
You are given an integer num. You know that Bob will sneakily remap one of the 10 possible digits (0 to 9) to another digit. Return the difference bet 阅读全文