leetcode.com 2026-06-11
🟡3558.number-of-ways-to-assign-edge-weights-i
🏷️ Tags
#tree #depth_first_search #math
🟡3558.number-of-ways-to-assign-edge-weights-i
🏷️ Tags
#tree #depth_first_search #math
Telegraph
number-of-ways-to-assign-edge-weights-i
There is an undirected tree with n nodes labeled from 1 to n, rooted at node 1. The tree is represented by a 2D integer array edges of length n - 1, where edges[i] = [ui, vi] indicates that there is an edge between nodes ui and vi. Initially, all edges have…
leetcode.cn 2026-06-12
🔴3559.number-of-ways-to-assign-edge-weights-ii
🏷️ Tags
#bit_manipulation #tree #depth_first_search #array #math #dynamic_programming
🔴3559.number-of-ways-to-assign-edge-weights-ii
🏷️ Tags
#bit_manipulation #tree #depth_first_search #array #math #dynamic_programming
Telegraph
number-of-ways-to-assign-edge-weights-ii
给你一棵有 n 个节点的无向树,节点从 1 到 n 编号,树以节点 1 为根。树由一个长度为 n - 1 的二维整数数组 edges 表示,其中 edges[i] = [ui, vi] 表示在节点 ui 和 vi 之间有一条边。
leetcode.com 2026-06-12
🔴3559.number-of-ways-to-assign-edge-weights-ii
🏷️ Tags
#bit_manipulation #tree #depth_first_search #array #math #dynamic_programming
🔴3559.number-of-ways-to-assign-edge-weights-ii
🏷️ Tags
#bit_manipulation #tree #depth_first_search #array #math #dynamic_programming
Telegraph
number-of-ways-to-assign-edge-weights-ii
There is an undirected tree with n nodes labeled from 1 to n, rooted at node 1. The tree is represented by a 2D integer array edges of length n - 1, where edges[i] = [ui, vi] indicates that there is an edge between nodes ui and vi. Initially, all edges have…
leetcode.cn 2026-07-08
🟡3756.concatenate-non-zero-digits-and-multiply-by-sum-ii
🏷️ Tags
#math #string #prefix_sum
🟡3756.concatenate-non-zero-digits-and-multiply-by-sum-ii
🏷️ Tags
#math #string #prefix_sum
Telegraph
concatenate-non-zero-digits-and-multiply-by-sum-ii
给你一个长度为 m 的字符串 s,其中仅包含数字。另给你一个二维整数数组 queries,其中 queries[i] = [li, ri]。