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 中移除任一石子。