leetcode.cn 2026-08-13
🔴2213.longest-substring-of-one-repeating-character
🏷️ Tags
#segment_tree #array #string #ordered_set
🔴2213.longest-substring-of-one-repeating-character
🏷️ Tags
#segment_tree #array #string #ordered_set
Telegraph
longest-substring-of-one-repeating-character
给你一个下标从 0 开始的字符串 s 。另给你一个下标从 0 开始、长度为 k 的字符串 queryCharacters ,一个下标从 0 开始、长度也是 k 的整数 下标 数组 queryIndices ,这两个都用来描述 k 个查询。 第 i 个查询会将 s 中位于下标 queryIndices[i] 的字符更新为 queryCharacters[i] 。 返回一个长度为 k 的数组 lengths ,其中 lengths[i] 是在执行第 i 个查询 之后 s 中仅由 单个字符重复 组成的 最长子字符串…
leetcode.com 2026-08-13
🔴2213.longest-substring-of-one-repeating-character
🏷️ Tags
#segment_tree #array #string #ordered_set
🔴2213.longest-substring-of-one-repeating-character
🏷️ Tags
#segment_tree #array #string #ordered_set
Telegraph
longest-substring-of-one-repeating-character
You are given a 0-indexed string s. You are also given a 0-indexed string queryCharacters of length k and a 0-indexed array of integer indices queryIndices of length k, both of which are used to describe k queries. The ith query updates the character in s…
leetcode.cn 2026-08-14
🟢3090.maximum-length-substring-with-two-occurrences
🏷️ Tags
#hash_table #string #sliding_window
🟢3090.maximum-length-substring-with-two-occurrences
🏷️ Tags
#hash_table #string #sliding_window
Telegraph
maximum-length-substring-with-two-occurrences
给你一个字符串 s ,请找出满足每个字符最多出现两次的最长子字符串,并返回该子字符串的 最大 长度。 示例 1: 输入: s = "bcbbbcba" 输出: 4 解释: 以下子字符串长度为 4,并且每个字符最多出现两次:"bcbbbcba"。 示例 2: 输入: s = "aaaa" 输出: 2 解释: 以下子字符串长度为 2,并且每个字符最多出现两次:"aaaa"。 提示:
leetcode.com 2026-08-14
🟢3090.maximum-length-substring-with-two-occurrences
🏷️ Tags
#hash_table #string #sliding_window
🟢3090.maximum-length-substring-with-two-occurrences
🏷️ Tags
#hash_table #string #sliding_window
Telegraph
maximum-length-substring-with-two-occurrences
Example 1: Input: s = "bcbbbcba" Output: 4 Explanation:
leetcode.cn 2026-08-15
🟡3702.longest-subsequence-with-non-zero-bitwise-xor
🏷️ Tags
#bit_manipulation #array
🟡3702.longest-subsequence-with-non-zero-bitwise-xor
🏷️ Tags
#bit_manipulation #array
Telegraph
longest-subsequence-with-non-zero-bitwise-xor
给你一个整数数组 nums。
leetcode.com 2026-08-15
🟡3702.longest-subsequence-with-non-zero-bitwise-xor
🏷️ Tags
#bit_manipulation #array
🟡3702.longest-subsequence-with-non-zero-bitwise-xor
🏷️ Tags
#bit_manipulation #array
Telegraph
longest-subsequence-with-non-zero-bitwise-xor
You are given an integer array nums. Return the length of the longest subsequence in nums whose bitwise XOR is non-zero. If no such subsequence exists, return 0. Example 1: Input: nums = [1,2,3] Output: 2 Explanation: One longest subsequence is [2, 3].…
leetcode.cn 2026-08-16
🟡2029.stone-game-ix
🏷️ Tags
#greedy #minimax_algorithm #array #math #counting #game_theory #nim_game #zero_sum_game
🟡2029.stone-game-ix
🏷️ Tags
#greedy #minimax_algorithm #array #math #counting #game_theory #nim_game #zero_sum_game
Telegraph
stone-game-ix
Alice 和 Bob 再次设计了一款新的石子游戏。现有一行 n 个石子,每个石子都有一个关联的数字表示它的价值。给你一个整数数组 stones ,其中 stones[i] 是第 i 个石子的价值。 Alice 和 Bob 轮流进行自己的回合,Alice 先手。每一回合,玩家需要从 stones 中移除任一石子。
leetcode.com 2026-08-16
🟡2029.stone-game-ix
🏷️ Tags
#greedy #minimax_algorithm #array #math #counting #game_theory #nim_game #zero_sum_game
🟡2029.stone-game-ix
🏷️ Tags
#greedy #minimax_algorithm #array #math #counting #game_theory #nim_game #zero_sum_game
Telegraph
stone-game-ix
Alice and Bob continue their games with stones. There is a row of n stones, and each stone has an associated value. You are given an integer array stones, where stones[i] is the value of the ith stone. Alice and Bob take turns, with Alice starting first.…