12 2024 档案
摘要:You are given a 0-indexed array nums and a non-negative integer k. In one operation, you can do the following: Choose an index i that hasn't been chos
阅读全文
摘要:You are given an integer array nums and an integer k. The frequency of an element x is the number of times it occurs in an array. An array is called g
阅读全文
摘要:You are given a digit string s that consists of digits from 0 to 9. A string is called semi-repetitive if there is at most one adjacent pair of the sa
阅读全文
摘要:You are given an array nums consisting of positive integers. Starting with score = 0, apply the following algorithm: Choose the smallest integer of th
阅读全文
摘要:Given a string s, return the maximum number of occurrences of any substring under the following rules: The number of unique characters in the substrin
阅读全文
摘要:You are given a 2D integer array points, where points[i] = [xi, yi]. You are also given an integer w. Your task is to cover all the given points with
阅读全文
摘要:Given an array of integers arr, return the number of subarrays with an odd sum. Since the answer can be very large, return it modulo 109 + 7. Example
阅读全文
摘要:An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You are given an array of integer nu
阅读全文
摘要:You are given a 0-indexed m x n matrix grid consisting of positive integers. You can start at any cell in the first column of the matrix, and traverse
阅读全文
摘要:You are given two 0-indexed strings str1 and str2. In an operation, you select a set of indices in str1, and for each index i in the set, increment st
阅读全文

浙公网安备 33010602011771号