leetcode.com 2025-07-17
🟡3202.find-the-maximum-length-of-valid-subsequence-ii
🏷️ Tags
#array #dynamic_programming
🟡3202.find-the-maximum-length-of-valid-subsequence-ii
🏷️ Tags
#array #dynamic_programming
Telegraph
find-the-maximum-length-of-valid-subsequence-ii
A subsequence sub of nums with length x is called valid if it satisfies:
leetcode.cn 2025-07-18
🔴2163.minimum-difference-in-sums-after-removal-of-elements
🏷️ Tags
#array #dynamic_programming #heap_priority_queue
🔴2163.minimum-difference-in-sums-after-removal-of-elements
🏷️ Tags
#array #dynamic_programming #heap_priority_queue
Telegraph
minimum-difference-in-sums-after-removal-of-elements
给你一个下标从 0 开始的整数数组 nums ,它包含 3 * n 个元素。 你可以从 nums 中删除 恰好 n 个元素,剩下的 2 * n 个元素将会被分成两个 相同大小 的部分。
leetcode.com 2025-07-18
🔴2163.minimum-difference-in-sums-after-removal-of-elements
🏷️ Tags
#array #dynamic_programming #heap_priority_queue
🔴2163.minimum-difference-in-sums-after-removal-of-elements
🏷️ Tags
#array #dynamic_programming #heap_priority_queue
Telegraph
minimum-difference-in-sums-after-removal-of-elements
You are given a 0-indexed integer array nums consisting of 3 * n elements. You are allowed to remove any subsequence of elements of size exactly n from nums. The remaining 2 * n elements will be divided into two equal parts:
leetcode.cn 2025-07-19
🟡1233.remove-sub-folders-from-the-filesystem
🏷️ Tags
#depth_first_search #trie #array #string
🟡1233.remove-sub-folders-from-the-filesystem
🏷️ Tags
#depth_first_search #trie #array #string
Telegraph
remove-sub-folders-from-the-filesystem
你是一位系统管理员,手里有一份文件夹列表 folder,你的任务是要删除该列表中的所有 子文件夹,并以 任意顺序 返回剩下的文件夹。 如果文件夹 folder[i] 位于另一个文件夹 folder[j] 下,那么 folder[i] 就是 folder[j] 的 子文件夹 。folder[j] 的子文件夹必须以 folder[j] 开头,后跟一个 "/"。例如,"/a/b" 是 "/a" 的一个子文件夹,但 "/b" 不是 "/a/b/c" 的一个子文件夹。 文件夹的「路径」是由一个或多个按以下格式串联…
leetcode.com 2025-07-19
🟡1233.remove-sub-folders-from-the-filesystem
🏷️ Tags
#depth_first_search #trie #array #string
🟡1233.remove-sub-folders-from-the-filesystem
🏷️ Tags
#depth_first_search #trie #array #string
Telegraph
remove-sub-folders-from-the-filesystem
Given a list of folders folder, return the folders after removing all sub-folders in those folders. You may return the answer in any order. If a folder[i] is located within another folder[j], it is called a sub-folder of it. A sub-folder of folder[j] must…
leetcode.cn 2025-07-20
🔴1948.delete-duplicate-folders-in-system
🏷️ Tags
#trie #array #hash_table #string #hash_function
🔴1948.delete-duplicate-folders-in-system
🏷️ Tags
#trie #array #hash_table #string #hash_function
Telegraph
delete-duplicate-folders-in-system
由于一个漏洞,文件系统中存在许多重复文件夹。给你一个二维数组 paths,其中 paths[i] 是一个表示文件系统中第 i 个文件夹的绝对路径的数组。
leetcode.com 2025-07-20
🔴1948.delete-duplicate-folders-in-system
🏷️ Tags
#trie #array #hash_table #string #hash_function
🔴1948.delete-duplicate-folders-in-system
🏷️ Tags
#trie #array #hash_table #string #hash_function
Telegraph
delete-duplicate-folders-in-system
Due to a bug, there are many duplicate folders in a file system. You are given a 2D array paths, where paths[i] is an array representing an absolute path to the ith folder in the file system.
leetcode.cn 2025-07-24
🔴2322.minimum-score-after-removals-on-a-tree
🏷️ Tags
#bit_manipulation #tree #depth_first_search #array
🔴2322.minimum-score-after-removals-on-a-tree
🏷️ Tags
#bit_manipulation #tree #depth_first_search #array
Telegraph
minimum-score-after-removals-on-a-tree
存在一棵无向连通树,树中有编号从 0 到 n - 1 的 n 个节点, 以及 n - 1 条边。 给你一个下标从 0 开始的整数数组 nums ,长度为 n ,其中 nums[i] 表示第 i 个节点的值。另给你一个二维整数数组 edges ,长度为 n - 1 ,其中 edges[i] = [ai, bi] 表示树中存在一条位于节点 ai 和 bi 之间的边。 删除树中两条 不同 的边以形成三个连通组件。对于一种删除边方案,定义如下步骤以计算其分数:
leetcode.com 2025-07-24
🔴2322.minimum-score-after-removals-on-a-tree
🏷️ Tags
#bit_manipulation #tree #depth_first_search #array
🔴2322.minimum-score-after-removals-on-a-tree
🏷️ Tags
#bit_manipulation #tree #depth_first_search #array
Telegraph
minimum-score-after-removals-on-a-tree
There is an undirected connected tree with n nodes labeled from 0 to n - 1 and n - 1 edges. You are given a 0-indexed integer array nums of length n where nums[i] represents the value of the ith node. You are also given a 2D integer array edges of length…
leetcode.cn 2025-07-25
🟢3487.maximum-unique-subarray-sum-after-deletion
🏷️ Tags
#greedy #array #hash_table
🟢3487.maximum-unique-subarray-sum-after-deletion
🏷️ Tags
#greedy #array #hash_table
Telegraph
maximum-unique-subarray-sum-after-deletion
给你一个整数数组 nums 。 你可以从数组 nums 中删除任意数量的元素,但不能将其变为 空 数组。执行删除操作后,选出 nums 中满足下述条件的一个子数组:
leetcode.com 2025-07-25
🟢3487.maximum-unique-subarray-sum-after-deletion
🏷️ Tags
#greedy #array #hash_table
🟢3487.maximum-unique-subarray-sum-after-deletion
🏷️ Tags
#greedy #array #hash_table
Telegraph
maximum-unique-subarray-sum-after-deletion
You are given an integer array nums. You are allowed to delete any number of elements from nums without making it empty. After performing the deletions, select a subarray of nums such that:
leetcode.cn 2025-07-26
🔴3480.maximize-subarrays-after-removing-one-conflicting-pair
🏷️ Tags
#segment_tree #array #enumeration #prefix_sum
🔴3480.maximize-subarrays-after-removing-one-conflicting-pair
🏷️ Tags
#segment_tree #array #enumeration #prefix_sum
Telegraph
maximize-subarrays-after-removing-one-conflicting-pair
给你一个整数 n,表示一个包含从 1 到 n 按顺序排列的整数数组 nums。此外,给你一个二维数组 conflictingPairs,其中 conflictingPairs[i] = [a, b] 表示 a 和 b 形成一个冲突对。
leetcode.com 2025-07-26
🔴3480.maximize-subarrays-after-removing-one-conflicting-pair
🏷️ Tags
#segment_tree #array #enumeration #prefix_sum
🔴3480.maximize-subarrays-after-removing-one-conflicting-pair
🏷️ Tags
#segment_tree #array #enumeration #prefix_sum
Telegraph
maximize-subarrays-after-removing-one-conflicting-pair
You are given an integer n which represents an array nums containing the numbers from 1 to n in order. Additionally, you are given a 2D array conflictingPairs, where conflictingPairs[i] = [a, b] indicates that a and b form a conflicting pair. Remove exactly…