882.reachable-nodes-in-subdivided-graph.pdf
220 KB
leetcode.cn 2022-11-26
🔴882.reachable-nodes-in-subdivided-graph
🏷️ Tags
#graph #shortest_path #heap_priority_queue
🔴882.reachable-nodes-in-subdivided-graph
🏷️ Tags
#graph #shortest_path #heap_priority_queue
787.cheapest-flights-within-k-stops.pdf
108.5 KB
leetcode.com 2023-01-26
🟡787.cheapest-flights-within-k-stops
🏷️ Tags
#dynamic_programming #depth_first_search #breadth_first_search #graph #heap_priority_queue #shortest_path
🟡787.cheapest-flights-within-k-stops
🏷️ Tags
#dynamic_programming #depth_first_search #breadth_first_search #graph #heap_priority_queue #shortest_path
leetcode.com 2023-05-20
🟡399.evaluate-division
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #array #shortest_path
🟡399.evaluate-division
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #array #shortest_path
Telegraph
evaluate-division
You are given an array of variable pairs equations and an array of real numbers values, where equations[i] = [Ai, Bi] and values[i] represent the equation Ai / Bi = values[i]. Each Ai or Bi is a string that represents a single variable. You are also given…
leetcode.cn 2023-06-04
🔴2699.modify-graph-edge-weights
🏷️ Tags
#graph #shortest_path #heap_priority_queue
🔴2699.modify-graph-edge-weights
🏷️ Tags
#graph #shortest_path #heap_priority_queue
Telegraph
modify-graph-edge-weights
给你一个 n 个节点的 无向带权连通 图,节点编号为 0 到 n - 1 ,再给你一个整数数组 edges ,其中 edges[i] = [ai, bi, wi] 表示节点 ai 和 bi 之间有一条边权为 wi 的边。 部分边的边权为 -1(wi = -1),其他边的边权都为 正 数(wi > 0)。 你需要将所有边权为 -1 的边都修改为范围 [1, 2 * 109] 中的 正整数 ,使得从节点 source 到节点 destination 的 最短距离 为整数 target 。如果有 多种 修改方案可以使 source…
leetcode.cn 2023-06-09
🔴2699.modify-graph-edge-weights
🏷️ Tags
#graph #shortest_path #heap_priority_queue
🔴2699.modify-graph-edge-weights
🏷️ Tags
#graph #shortest_path #heap_priority_queue
Telegraph
modify-graph-edge-weights
给你一个 n 个节点的 无向带权连通 图,节点编号为 0 到 n - 1 ,再给你一个整数数组 edges ,其中 edges[i] = [ai, bi, wi] 表示节点 ai 和 bi 之间有一条边权为 wi 的边。 部分边的边权为 -1(wi = -1),其他边的边权都为 正 数(wi > 0)。 你需要将所有边权为 -1 的边都修改为范围 [1, 2 * 109] 中的 正整数 ,使得从节点 source 到节点 destination 的 最短距离 为整数 target 。如果有 多种 修改方案可以使 source…
leetcode.com 2023-06-28
🟡1514.path-with-maximum-probability
🏷️ Tags
#graph #array #shortest_path #heap_priority_queue
🟡1514.path-with-maximum-probability
🏷️ Tags
#graph #array #shortest_path #heap_priority_queue
Telegraph
path-with-maximum-probability
You are given an undirected weighted graph of n nodes (0-indexed), represented by an edge list where edges[i] = [a, b] is an undirected edge connecting the nodes a and b with a probability of success of traversing that edge succProb[i]. Given two nodes start and end…
leetcode.com 2023-11-11
🔴2642.design-graph-with-shortest-path-calculator
🏷️ Tags
#graph #design #shortest_path #heap_priority_queue
🔴2642.design-graph-with-shortest-path-calculator
🏷️ Tags
#graph #design #shortest_path #heap_priority_queue
Telegraph
design-graph-with-shortest-path-calculator
There is a directed weighted graph that consists of n nodes numbered from 0 to n - 1. The edges of the graph are initially represented by the given array edges where edges[i] = [fromi, toi, edgeCosti] meaning that there is an edge from fromi to toi with the…
leetcode.cn 2023-11-14
🟡1334.find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
🏷️ Tags
#graph #dynamic_programming #shortest_path
🟡1334.find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
🏷️ Tags
#graph #dynamic_programming #shortest_path
Telegraph
find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
有 n 个城市,按从 0 到 n-1 编号。给你一个边数组 edges,其中 edges[i] = [fromi, toi, weighti] 代表 fromi 和 toi 两个城市之间的双向加权边,距离阈值是一个整数 distanceThreshold。 返回能通过某些路径到达其他城市数目最少、且路径距离 最大 为 distanceThreshold 的城市。如果有多个这样的城市,则返回编号最大的城市。 注意,连接城市 i 和 j 的路径的距离等于沿该路径的所有边的权重之和。 示例 1: 输入:n…
👍1
leetcode.cn 2025-05-07
🟡3341.find-minimum-time-to-reach-last-room-i
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
🟡3341.find-minimum-time-to-reach-last-room-i
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
Telegraph
find-minimum-time-to-reach-last-room-i
有一个地窖,地窖中有 n x m 个房间,它们呈网格状排布。 给你一个大小为 n x m 的二维数组 moveTime ,其中 moveTime[i][j] 表示在这个时刻 以后 你才可以 开始 往这个房间 移动 。你在时刻 t = 0 时从房间 (0, 0) 出发,每次可以移动到 相邻 的一个房间。在 相邻 房间之间移动需要的时间为 1 秒。
leetcode.com 2025-05-07
🟡3341.find-minimum-time-to-reach-last-room-i
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
🟡3341.find-minimum-time-to-reach-last-room-i
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
Telegraph
find-minimum-time-to-reach-last-room-i
There is a dungeon with n x m rooms arranged as a grid. You are given a 2D array moveTime of size n x m, where moveTime[i][j] represents the minimum time in seconds when you can start moving to that room. You start from the room (0, 0) at time t = 0 and can…
leetcode.cn 2025-05-08
🟡3342.find-minimum-time-to-reach-last-room-ii
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
🟡3342.find-minimum-time-to-reach-last-room-ii
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
Telegraph
find-minimum-time-to-reach-last-room-ii
有一个地窖,地窖中有 n x m 个房间,它们呈网格状排布。 给你一个大小为 n x m 的二维数组 moveTime ,其中 moveTime[i][j] 表示在这个时刻 以后 你才可以 开始 往这个房间 移动 。你在时刻 t = 0 时从房间 (0, 0) 出发,每次可以移动到 相邻 的一个房间。在 相邻 房间之间移动需要的时间为:第一次花费 1 秒,第二次花费 2 秒,第三次花费 1 秒,第四次花费 2 秒……如此 往复 。
leetcode.com 2025-05-08
🟡3342.find-minimum-time-to-reach-last-room-ii
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
🟡3342.find-minimum-time-to-reach-last-room-ii
🏷️ Tags
#graph #array #matrix #shortest_path #heap_priority_queue
Telegraph
find-minimum-time-to-reach-last-room-ii
There is a dungeon with n x m rooms arranged as a grid. You are given a 2D array moveTime of size n x m, where moveTime[i][j] represents the minimum time in seconds when you can start moving to that room. You start from the room (0, 0) at time t = 0 and can…