leetcode.com 2025-10-22
🔴3347.maximum-frequency-of-an-element-after-performing-operations-ii
🏷️ Tags
#array #binary_search #prefix_sum #sorting #sliding_window
🔴3347.maximum-frequency-of-an-element-after-performing-operations-ii
🏷️ Tags
#array #binary_search #prefix_sum #sorting #sliding_window
Telegraph
maximum-frequency-of-an-element-after-performing-operations-ii
You are given an integer array nums and two integers k and numOperations. You must perform an operation numOperations times on nums, where in each operation you:
leetcode.cn 2025-10-23
🟢3461.check-if-digits-are-equal-in-string-after-operations-i
🏷️ Tags
#math #string #combinatorics #number_theory #simulation
🟢3461.check-if-digits-are-equal-in-string-after-operations-i
🏷️ Tags
#math #string #combinatorics #number_theory #simulation
Telegraph
check-if-digits-are-equal-in-string-after-operations-i
给你一个由数字组成的字符串 s 。重复执行以下操作,直到字符串恰好包含 两个 数字:
leetcode.com 2025-10-23
🟢3461.check-if-digits-are-equal-in-string-after-operations-i
🏷️ Tags
#math #string #combinatorics #number_theory #simulation
🟢3461.check-if-digits-are-equal-in-string-after-operations-i
🏷️ Tags
#math #string #combinatorics #number_theory #simulation
Telegraph
check-if-digits-are-equal-in-string-after-operations-i
You are given a string s consisting of digits. Perform the following operation repeatedly until the string has exactly two digits:
❤1
leetcode.cn 2025-10-24
🟡2048.next-greater-numerically-balanced-number
🏷️ Tags
#hash_table #math #backtracking #counting #enumeration
🟡2048.next-greater-numerically-balanced-number
🏷️ Tags
#hash_table #math #backtracking #counting #enumeration
Telegraph
next-greater-numerically-balanced-number
如果整数 x 满足:对于每个数位 d ,这个数位 恰好 在 x 中出现 d 次。那么整数 x 就是一个 数值平衡数 。 给你一个整数 n ,请你返回 严格大于 n 的 最小数值平衡数 。 示例 1: 输入:n = 1 输出:22 解释: 22 是一个数值平衡数,因为: - 数字 2 出现 2 次 这也是严格大于 1 的最小数值平衡数。 示例 2: 输入:n = 1000 输出:1333 解释: 1333 是一个数值平衡数,因为: - 数字 1 出现 1 次。 - 数字 3 出现 3 次。 这也是严格大于…
leetcode.com 2025-10-24
🟡2048.next-greater-numerically-balanced-number
🏷️ Tags
#hash_table #math #backtracking #counting #enumeration
🟡2048.next-greater-numerically-balanced-number
🏷️ Tags
#hash_table #math #backtracking #counting #enumeration
Telegraph
next-greater-numerically-balanced-number
An integer x is numerically balanced if for every digit d in the number x, there are exactly d occurrences of that digit in x. Given an integer n, return the smallest numerically balanced number strictly greater than n. Example 1: Input: n = 1 Output: 22…
leetcode.cn 2025-10-30
🔴1526.minimum-number-of-increments-on-subarrays-to-form-a-target-array
🏷️ Tags
#stack #greedy #array #dynamic_programming #monotonic_stack
🔴1526.minimum-number-of-increments-on-subarrays-to-form-a-target-array
🏷️ Tags
#stack #greedy #array #dynamic_programming #monotonic_stack
Telegraph
minimum-number-of-increments-on-subarrays-to-form-a-target-array
给你一个整数数组 target 和一个数组 initial ,initial 数组与 target 数组有同样的维度,且一开始全部为 0 。 请你返回从 initial 得到 target 的最少操作次数,每次操作需遵循以下规则:
leetcode.com 2025-10-30
🔴1526.minimum-number-of-increments-on-subarrays-to-form-a-target-array
🏷️ Tags
#stack #greedy #array #dynamic_programming #monotonic_stack
🔴1526.minimum-number-of-increments-on-subarrays-to-form-a-target-array
🏷️ Tags
#stack #greedy #array #dynamic_programming #monotonic_stack
Telegraph
minimum-number-of-increments-on-subarrays-to-form-a-target-array
You are given an integer array target. You have an integer array initial of the same size as target with all elements initially zeros. In one operation you can choose any subarray from initial and increment each value by one. Return the minimum number of…
leetcode.cn 2025-11-01
🟡3217.delete-nodes-from-linked-list-present-in-array
🏷️ Tags
#array #hash_table #linked_list
🟡3217.delete-nodes-from-linked-list-present-in-array
🏷️ Tags
#array #hash_table #linked_list
Telegraph
delete-nodes-from-linked-list-present-in-array
给你一个整数数组 nums 和一个链表的头节点 head。从链表中移除所有存在于 nums 中的节点后,返回修改后的链表的头节点。 示例 1: 输入: nums = [1,2,3], head = [1,2,3,4,5] 输出: [4,5] 解释: 移除数值为 1, 2 和 3 的节点。 示例 2: 输入: nums = [1], head = [1,2,1,2,1,2] 输出: [2,2,2] 解释: 移除数值为 1 的节点。 示例 3: 输入: nums = [5], head = [1,2,3…
leetcode.com 2025-11-01
🟡3217.delete-nodes-from-linked-list-present-in-array
🏷️ Tags
#array #hash_table #linked_list
🟡3217.delete-nodes-from-linked-list-present-in-array
🏷️ Tags
#array #hash_table #linked_list
Telegraph
delete-nodes-from-linked-list-present-in-array
You are given an array of integers nums and the head of a linked list. Return the head of the modified linked list after removing all nodes from the linked list that have a value that exists in nums. Example 1: Input: nums = [1,2,3], head = [1,2,3,4,5]…