leetcode.cn 2025-12-19
🔴2092.find-all-people-with-secret
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #sorting
🔴2092.find-all-people-with-secret
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #sorting
Telegraph
find-all-people-with-secret
给你一个整数 n ,表示有 n 个专家从 0 到 n - 1 编号。另外给你一个下标从 0 开始的二维整数数组 meetings ,其中 meetings[i] = [xi, yi, timei] 表示专家 xi 和专家 yi 在时间 timei 要开一场会。一个专家可以同时参加 多场会议 。最后,给你一个整数 firstPerson 。 专家 0 有一个 秘密 ,最初,他在时间 0 将这个秘密分享给了专家 firstPerson 。接着,这个秘密会在每次有知晓这个秘密的专家参加会议时进行传播。更正式的表达是,每次会议,如果专家…
leetcode.com 2025-12-19
🔴2092.find-all-people-with-secret
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #sorting
🔴2092.find-all-people-with-secret
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #sorting
Telegraph
find-all-people-with-secret
You are given an integer n indicating there are n people numbered from 0 to n - 1. You are also given a 0-indexed 2D integer array meetings where meetings[i] = [xi, yi, timei] indicates that person xi and person yi have a meeting at timei. A person may attend…
leetcode.cn 2026-01-27
🟡3650.minimum-cost-path-with-edge-reversals
🏷️ Tags
#graph #shortest_path #heap_priority_queue
🟡3650.minimum-cost-path-with-edge-reversals
🏷️ Tags
#graph #shortest_path #heap_priority_queue
Telegraph
minimum-cost-path-with-edge-reversals
给你一个包含 n 个节点的有向带权图,节点编号从 0 到 n - 1。同时给你一个数组 edges,其中 edges[i] = [ui, vi, wi] 表示一条从节点 ui 到节点 vi 的有向边,其成本为 wi。
leetcode.com 2026-01-27
🟡3650.minimum-cost-path-with-edge-reversals
🏷️ Tags
#graph #shortest_path #heap_priority_queue
🟡3650.minimum-cost-path-with-edge-reversals
🏷️ Tags
#graph #shortest_path #heap_priority_queue
Telegraph
minimum-cost-path-with-edge-reversals
You are given a directed, weighted graph with n nodes labeled from 0 to n - 1, and an array edges where edges[i] = [ui, vi, wi] represents a directed edge from node ui to node vi with cost wi. Each node ui has a switch that can be used at most once: when…
leetcode.cn 2026-01-29
🟡2976.minimum-cost-to-convert-string-i
🏷️ Tags
#graph #array #string #shortest_path
🟡2976.minimum-cost-to-convert-string-i
🏷️ Tags
#graph #array #string #shortest_path
Telegraph
minimum-cost-to-convert-string-i
给你两个下标从 0 开始的字符串 source 和 target ,它们的长度均为 n 并且由 小写 英文字母组成。 另给你两个下标从 0 开始的字符数组 original 和 changed ,以及一个整数数组 cost ,其中 cost[i] 代表将字符 original[i] 更改为字符 changed[i] 的成本。 你从字符串 source 开始。在一次操作中,如果 存在 任意 下标 j 满足 cost[j] == z 、original[j] == x 以及 changed[j] == y…
leetcode.com 2026-01-29
🟡2976.minimum-cost-to-convert-string-i
🏷️ Tags
#graph #array #string #shortest_path
🟡2976.minimum-cost-to-convert-string-i
🏷️ Tags
#graph #array #string #shortest_path
Telegraph
minimum-cost-to-convert-string-i
You are given two 0-indexed strings source and target, both of length n and consisting of lowercase English letters. You are also given two 0-indexed character arrays original and changed, and an integer array cost, where cost[i] represents the cost of changing…
leetcode.cn 2026-01-30
🔴2977.minimum-cost-to-convert-string-ii
🏷️ Tags
#graph #trie #array #string #dynamic_programming #shortest_path
🔴2977.minimum-cost-to-convert-string-ii
🏷️ Tags
#graph #trie #array #string #dynamic_programming #shortest_path
Telegraph
minimum-cost-to-convert-string-ii
给你两个下标从 0 开始的字符串 source 和 target ,它们的长度均为 n 并且由 小写 英文字母组成。 另给你两个下标从 0 开始的字符串数组 original 和 changed ,以及一个整数数组 cost ,其中 cost[i] 代表将字符串 original[i] 更改为字符串 changed[i] 的成本。 你从字符串 source 开始。在一次操作中,如果 存在 任意 下标 j 满足 cost[j] == z 、original[j] == x 以及 changed[j] ==…
leetcode.com 2026-01-30
🔴2977.minimum-cost-to-convert-string-ii
🏷️ Tags
#graph #trie #array #string #dynamic_programming #shortest_path
🔴2977.minimum-cost-to-convert-string-ii
🏷️ Tags
#graph #trie #array #string #dynamic_programming #shortest_path
Telegraph
minimum-cost-to-convert-string-ii
You are given two 0-indexed strings source and target, both of length n and consisting of lowercase English characters. You are also given two 0-indexed string arrays original and changed, and an integer array cost, where cost[i] represents the cost of converting…
leetcode.cn 2026-03-12
🔴3600.maximize-spanning-tree-stability-with-upgrades
🏷️ Tags
#greedy #union_find #graph #binary_search #minimum_spanning_tree
🔴3600.maximize-spanning-tree-stability-with-upgrades
🏷️ Tags
#greedy #union_find #graph #binary_search #minimum_spanning_tree
Telegraph
maximize-spanning-tree-stability-with-upgrades
给你一个整数 n,表示编号从 0 到 n - 1 的 n 个节点,以及一个 edges 列表,其中 edges[i] = [ui, vi, si, musti]:
leetcode.com 2026-03-12
🔴3600.maximize-spanning-tree-stability-with-upgrades
🏷️ Tags
#greedy #union_find #graph #binary_search #minimum_spanning_tree
🔴3600.maximize-spanning-tree-stability-with-upgrades
🏷️ Tags
#greedy #union_find #graph #binary_search #minimum_spanning_tree
Telegraph
maximize-spanning-tree-stability-with-upgrades
You are given an integer n, representing n nodes numbered from 0 to n - 1 and a list of edges, where edges[i] = [ui, vi, si, musti]: