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 阅读全文
posted @ 2024-12-19 03:04 CNoodle 阅读(45) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-12-17 04:39 CNoodle 阅读(61) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-12-16 11:51 CNoodle 阅读(44) 评论(0) 推荐(0)
摘要:You are given an array nums consisting of positive integers. Starting with score = 0, apply the following algorithm: Choose the smallest integer of th 阅读全文
posted @ 2024-12-14 06:15 CNoodle 阅读(41) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-12-13 14:53 CNoodle 阅读(60) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-12-11 15:01 CNoodle 阅读(81) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-12-10 14:14 CNoodle 阅读(158) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-12-10 07:30 CNoodle 阅读(58) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-12-08 08:30 CNoodle 阅读(73) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-12-05 00:16 CNoodle 阅读(58) 评论(0) 推荐(0)