leetcode.cn 2025-02-27
🔴2296.design-a-text-editor
🏷️ Tags
#stack #design #linked_list #string #doubly_linked_list #simulation
🔴2296.design-a-text-editor
🏷️ Tags
#stack #design #linked_list #string #doubly_linked_list #simulation
Telegraph
design-a-text-editor
请你设计一个带光标的文本编辑器,它可以实现以下功能:
leetcode.com 2025-02-27
🟡873.length-of-longest-fibonacci-subsequence
🏷️ Tags
#array #hash_table #dynamic_programming
🟡873.length-of-longest-fibonacci-subsequence
🏷️ Tags
#array #hash_table #dynamic_programming
Telegraph
length-of-longest-fibonacci-subsequence
A sequence x1, x2, ..., xn is Fibonacci-like if:
leetcode.cn 2025-02-28
🟡2353.design-a-food-rating-system
🏷️ Tags
#design #array #hash_table #string #ordered_set #heap_priority_queue
🟡2353.design-a-food-rating-system
🏷️ Tags
#design #array #hash_table #string #ordered_set #heap_priority_queue
Telegraph
design-a-food-rating-system
设计一个支持下述操作的食物评分系统:
leetcode.com 2025-03-02
🟢2570.merge-two-2d-arrays-by-summing-values
🏷️ Tags
#array #hash_table #two_pointers
🟢2570.merge-two-2d-arrays-by-summing-values
🏷️ Tags
#array #hash_table #two_pointers
Telegraph
merge-two-2d-arrays-by-summing-values
You are given two 2D integer arrays nums1 and nums2.
leetcode.com 2025-03-03
🟡2161.partition-array-according-to-given-pivot
🏷️ Tags
#array #two_pointers #simulation
🟡2161.partition-array-according-to-given-pivot
🏷️ Tags
#array #two_pointers #simulation
Telegraph
partition-array-according-to-given-pivot
You are given a 0-indexed integer array nums and an integer pivot. Rearrange nums such that the following conditions are satisfied:
leetcode.cn 2025-03-06
🟡2588.count-the-number-of-beautiful-subarrays
🏷️ Tags
#bit_manipulation #array #hash_table #prefix_sum
🟡2588.count-the-number-of-beautiful-subarrays
🏷️ Tags
#bit_manipulation #array #hash_table #prefix_sum
Telegraph
count-the-number-of-beautiful-subarrays
给你一个下标从 0 开始的整数数组nums 。每次操作中,你可以:
leetcode.com 2025-03-06
🟢2965.find-missing-and-repeated-values
🏷️ Tags
#array #hash_table #math #matrix
🟢2965.find-missing-and-repeated-values
🏷️ Tags
#array #hash_table #math #matrix
Telegraph
find-missing-and-repeated-values
You are given a 0-indexed 2D integer matrix grid of size n * n with values in the range [1, n2]. Each integer appears exactly once except a which appears twice and b which is missing. The task is to find the repeating and missing numbers a and b. Return a…
leetcode.cn 2025-03-07
🟡2597.the-number-of-beautiful-subsets
🏷️ Tags
#array #hash_table #math #dynamic_programming #backtracking #combinatorics #sorting
🟡2597.the-number-of-beautiful-subsets
🏷️ Tags
#array #hash_table #math #dynamic_programming #backtracking #combinatorics #sorting
Telegraph
the-number-of-beautiful-subsets
给你一个由正整数组成的数组 nums 和一个 正 整数 k 。 如果 nums 的子集中,任意两个整数的绝对差均不等于 k ,则认为该子数组是一个 美丽 子集。 返回数组 nums 中 非空 且 美丽 的子集数目。 nums 的子集定义为:可以经由 nums 删除某些元素(也可能不删除)得到的一个数组。只有在删除元素时选择的索引不同的情况下,两个子集才会被视作是不同的子集。 示例 1: 输入:nums = [2,4,6], k = 2 输出:4 解释:数组 nums 中的美丽子集有:[2], [4]…
leetcode.cn 2025-03-08
🔴2234.maximum-total-beauty-of-the-gardens
🏷️ Tags
#greedy #array #two_pointers #binary_search #sorting
🔴2234.maximum-total-beauty-of-the-gardens
🏷️ Tags
#greedy #array #two_pointers #binary_search #sorting
Telegraph
maximum-total-beauty-of-the-gardens
Alice 是 n 个花园的园丁,她想通过种花,最大化她所有花园的总美丽值。 给你一个下标从 0 开始大小为 n 的整数数组 flowers ,其中 flowers[i] 是第 i 个花园里已经种的花的数目。已经种了的花 不能 移走。同时给你 newFlowers ,表示 Alice 额外可以种花的 最大数目 。同时给你的还有整数 target ,full 和 partial 。 如果一个花园有 至少 target 朵花,那么这个花园称为 完善的 ,花园的 总美丽值 为以下分数之 和 :
leetcode.com 2025-03-08
🟢2379.minimum-recolors-to-get-k-consecutive-black-blocks
🏷️ Tags
#string #sliding_window
🟢2379.minimum-recolors-to-get-k-consecutive-black-blocks
🏷️ Tags
#string #sliding_window
Telegraph
minimum-recolors-to-get-k-consecutive-black-blocks
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' and 'B' denote the colors white and black, respectively. You are also given an integer k, which is the desired…