随笔分类 - Graph
摘要:You are given a list of edges in a graph with weight. Find all the paths between start node and end node with min weights in the path. The edges like
阅读全文
摘要:You are given a data structure of employee information, which includes the employee's unique id, their importance value and their direct subordinates'
阅读全文
摘要:You have a graph of n nodes. You are given an integer n and an array edges where edges[i] = [ai, bi] indicates that there is an edge between ai and bi
阅读全文
摘要:You are given an n x n binary matrix grid. You are allowed to change at most one 0 to be 1. Return the size of the largest island in grid after applyi
阅读全文
摘要:There are n cities connected by m flights. Each flight starts from city u and arrives at v with a price w. Now given all the cities and flights, toget
阅读全文
摘要:Given a directed acyclic graph (DAG) of n nodes labeled from 0 to n - 1, find all possible paths from node 0 to node n - 1, and return them in any ord
阅读全文
摘要:You are given some lists of regions where the first region of each list includes all other regions in that list. Naturally, if a region X contains ano
阅读全文
摘要:Given a list accounts, each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements a
阅读全文
摘要:In an infinite chess board with coordinates from -infinity to +infinity, you have a knight at square [0, 0].A knight has 8 possible moves it can make,
阅读全文
摘要:We are given a binary tree (with root node root), a target node, and an integer value K. Return a list of the values of all nodes that have a distance
阅读全文
摘要:Given an undirected graph, return true if and only if it is bipartite. Recall that a graph is bipartite if we can split it's set of nodes into two ind
阅读全文
摘要:Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given
阅读全文
摘要:Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled
阅读全文
摘要:Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tick
阅读全文
摘要:There is a new alien language which uses the latin alphabet. However, the order among letters are unknown to you. You receive a list of words from the
阅读全文

浙公网安备 33010602011771号