leetcode.cn 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
给你一棵 n 个节点的无向树,节点从 1 到 n 编号,树以节点 1 为根。树由一个长度为 n - 1 的二维整数数组 edges 表示,其中 edges[i] = [ui, vi] 表示在节点 ui 和 vi 之间有一条边。
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-06-14
🟡2130.maximum-twin-sum-of-a-linked-list
🏷️ Tags
#stack #linked_list #two_pointers
🟡2130.maximum-twin-sum-of-a-linked-list
🏷️ Tags
#stack #linked_list #two_pointers
Telegraph
maximum-twin-sum-of-a-linked-list
在一个大小为 n 且 n 为 偶数 的链表中,对于 0 <= i <= (n / 2) - 1 的 i ,第 i 个节点(下标从 0 开始)的孪生节点为第 (n-1-i) 个节点 。
leetcode.com 2026-06-14
🟡2130.maximum-twin-sum-of-a-linked-list
🏷️ Tags
#stack #linked_list #two_pointers
🟡2130.maximum-twin-sum-of-a-linked-list
🏷️ Tags
#stack #linked_list #two_pointers
Telegraph
maximum-twin-sum-of-a-linked-list
In a linked list of size n, where n is even, the ith node (0-indexed) of the linked list is known as the twin of the (n-1-i)th node, if 0 <= i <= (n / 2) - 1.
leetcode.cn 2026-06-15
🟡2095.delete-the-middle-node-of-a-linked-list
🏷️ Tags
#linked_list #two_pointers
🟡2095.delete-the-middle-node-of-a-linked-list
🏷️ Tags
#linked_list #two_pointers
Telegraph
delete-the-middle-node-of-a-linked-list
给你一个链表的头节点 head 。删除 链表的 中间节点 ,并返回修改后的链表的头节点 head 。 长度为 n 链表的中间节点是从头数起第 ⌊n / 2⌋ 个节点(下标从 0 开始),其中 ⌊x⌋ 表示小于或等于 x 的最大整数。
leetcode.com 2026-06-15
🟡2095.delete-the-middle-node-of-a-linked-list
🏷️ Tags
#linked_list #two_pointers
🟡2095.delete-the-middle-node-of-a-linked-list
🏷️ Tags
#linked_list #two_pointers
Telegraph
delete-the-middle-node-of-a-linked-list
You are given the head of a linked list. Delete the middle node, and return the head of the modified linked list. The middle node of a linked list of size n is the ⌊n / 2⌋th node from the start using 0-based indexing, where ⌊x⌋ denotes the largest integer…