03 2025 档案
摘要:An element x of an integer array arr of length m is dominant if more than half the elements of arr have a value of x. You are given a 0-indexed intege
阅读全文
摘要:You are given a 2D integer grid of size m x n and an integer x. In one operation, you can add x to or subtract x from any element in the grid. A uni-v
阅读全文
摘要:You are given a 0-indexed binary string s of length n on which you can apply two types of operations: Choose an index i and invert all characters from
阅读全文
摘要:You are given a binary array nums. You can do the following operation on the array any number of times (possibly zero): Choose any 3 consecutive eleme
阅读全文
摘要:You are given an integer array nums. You need to create a 2D array from nums satisfying the following conditions: The 2D array should contain only the
阅读全文
摘要:You are given an array nums consisting of positive integers. We call a subarray of nums nice if the bitwise AND of every pair of elements that are in
阅读全文
摘要:You are given a 0-indexed integer array candies. Each element in the array denotes a pile of candies of size candies[i]. You can divide each pile into
阅读全文
摘要:You are given a binary array nums. We call a subarray alternating if no two adjacent elements in the subarray have the same value. Return the number o
阅读全文
摘要:There is a circle of red and blue tiles. You are given an array of integers colors and an integer k. The color of tile i is represented by colors[i]:
阅读全文
摘要:The k-beauty of an integer num is defined as the number of substrings of num when it is read as a string that meet the following conditions: It has a
阅读全文
摘要:You are given a 0-indexed integer array nums. In one operation, you can: Choose two different indices i and j such that 0 <= i, j < nums.length. Choos
阅读全文

浙公网安备 33010602011771号