Problem library
Graph
All problems that are about graph.
74
/ 74 problems
| Problem | Category | Time | Solved |
|---|---|---|---|
|
Number of increasing paths in a grid
dynamic-programming
graph
|
O(m*n) | Jun 17, 2023 | |
|
Time needed to inform all employees
graph
|
O(n) | Jun 2, 2023 | |
|
Shortest path in binary matrix
graph
|
O(n) | Jun 1, 2023 | |
|
Sentence similarity
array-and-hashmap
graph
|
O(n) | Feb 1, 2023 | |
|
Find closest node to given two nodes
graph
|
O(n) | Jan 25, 2023 | |
|
Lexicographically smallest equivalent string
graph
|
O(n) | Jan 14, 2023 | |
|
Minimum time to collect all apples in a tree
tree
graph
|
O(n) | Jan 11, 2023 | |
|
Check if there is a valid path in a grid
graph
|
O(mn) | Jan 4, 2023 | |
|
K highest ranked items within a price range
heap
graph
|
O(mnlog(mn)) | Jan 2, 2023 | |
|
Synonymous sentences
graph
|
O(n^2) | Dec 27, 2022 | |
|
Number of distinct islands
graph
|
O(mn) | Dec 24, 2022 | |
|
Maximal network rank
graph
|
O(n^2) | Dec 21, 2022 | |
|
Possible bipartition
graph
|
O(n+m) | Dec 21, 2022 | |
|
Number of closed islands
graph
|
O(mn) | Dec 16, 2022 | |
|
Minimum cost to buy apples
graph
|
O(nlog(n)) | Dec 7, 2022 | |
|
Find center of star graph
graph
|
O(1) | Dec 5, 2022 | |
|
Minimum score of a path between two cities
graph
|
O(n) | Dec 5, 2022 | |
|
Number of connected components in an undirected graph
graph
|
O(n) | Dec 3, 2022 | |
|
Connecting cities with minimum cost
graph
|
O(nlog(n)) | Dec 2, 2022 | |
|
Minimum cost to reach city with discounts
graph
|
O(nlog(n)) | Dec 2, 2022 | |
|
Nearest exit from entrance in maze
graph
|
O(mn) | Nov 21, 2022 | |
|
Number of operations to make network connected
graph
|
O(n) | Nov 21, 2022 | |
|
Number of ways to arrive at destination
graph
|
O(nlog(n)) | Nov 20, 2022 | |
|
Path with maximum probability
graph
|
O(nlog(n)) | Nov 20, 2022 | |
|
Frog position after t seconds
graph
|
O(n) | Nov 18, 2022 | |
|
Most stones removed with same row or column
graph
|
O(n) | Nov 14, 2022 | |
|
Minimum number of vertices to reach all nodes
graph
|
O(n) | Nov 6, 2022 | |
|
Find all possible recipes from given supplies
graph
|
O(n) | Oct 31, 2022 | |
|
Shortest path in a grid with obstacles elimination
graph
|
O(mn) | Oct 30, 2022 | |
|
Minesweeper
graph
|
O(n^2) | Oct 26, 2022 | |
|
Shortest bridge
graph
|
O(n^2) | Oct 26, 2022 | |
|
Open the lock
graph
|
O(n^2) | Oct 24, 2022 | |
|
Flood fill
graph
|
O(n) | Sep 28, 2022 | |
|
Satisfiability of equality equations
graph
|
O(n^2) | Sep 26, 2022 | |
|
Minimum genetic mutation
graph
|
O(n) | Sep 16, 2022 | |
|
Is graph bipartite
graph
|
O(n) | Sep 13, 2022 | |
|
Find the city with the smallest number of neighbors at a threshold distance
graph
|
O(n^3) | Sep 11, 2022 | |
|
Number of restricted paths from first to last node
graph
|
O(elog(v)) | Sep 11, 2022 | |
|
Coloring a border
graph
|
O(n) | Sep 10, 2022 | |
|
Island perimeter
graph
|
O(n) | Sep 10, 2022 | |
|
Keys and rooms
graph
|
O(n) | Sep 7, 2022 | |
|
Lexicographical numbers
graph
|
O(nlog(n)) | Sep 6, 2022 | |
|
All ancestors of a node in a directed acyclic graph
graph
|
O(n^2) | Sep 5, 2022 | |
|
Battleships in a board
graph
|
O(n) | Sep 5, 2022 | |
|
Course schedule IV
graph
|
O(q*(n+p)) | Sep 5, 2022 | |
|
House robber III
graph
|
O(n) | Sep 5, 2022 | |
|
Number of enclaves
graph
|
O((m*n)^2) | Sep 5, 2022 | |
|
Evaluate division
graph
|
O(n^2*q) | Sep 4, 2022 | |
|
Reachable nodes with restrictions
graph
|
O(ev) | Sep 2, 2022 | |
|
Minimum height trees
graph
|
O(n) | Sep 1, 2022 | |
|
Number of islands
graph
|
O(n^2) | Aug 29, 2022 | |
|
Number of provinces
graph
|
O(n^2) | Aug 29, 2022 | |
|
Count servers that communicate
graph
|
O(n*m) | Aug 25, 2022 | |
|
Word ladder II
graph
|
O((n+m)*l) | Aug 14, 2022 | |
|
Redundant connection
graph
|
O(n*log(n)) | Aug 12, 2022 | |
|
Walls and gates
graph
|
O(n*m) | Aug 12, 2022 | |
|
Word ladder
graph
|
O(n^2) | Aug 12, 2022 | |
|
Pacific atlantic water flow
graph
|
O(n*m) | Aug 11, 2022 | |
|
Surrounded regions
graph
|
O(n*m) | Aug 11, 2022 | |
|
Clone graph
graph
|
O(n) | Aug 8, 2022 | |
|
Find eventual safe states
graph
|
O(n) | Aug 2, 2022 | |
|
Min cost to connect all points
graph
|
O(n^2 * log(n)) | Jul 28, 2022 | |
|
reconstruct-itinerary
graph
|
O(E^2) | Jul 28, 2022 | |
|
Swim in rising water
graph
|
O(n^2 * log(n)) | Jul 28, 2022 | |
|
Alien dictionary
graph
|
O(n) | Jul 26, 2022 | |
|
Cheapest flights within k stops
graph
|
O(n*k) | Jul 26, 2022 | |
|
Network delay time
graph
|
O(E*logV) | Jul 26, 2022 | |
|
Verifying an alien dictionary
graph
|
O(n*k) | Jul 26, 2022 | |
|
Number of connected components in an undirected graph
graph
|
O(n*e) | Jul 25, 2022 | |
|
Graph valid tree
graph
|
O(n) | Jul 21, 2022 | |
|
Course schedule II
graph
|
O(n+p) | Jul 16, 2022 | |
|
Course schedule
graph
|
O(n+p) | Jul 16, 2022 | |
|
Rotting oranges
graph
|
O(n*m) | Jul 12, 2022 | |
|
Max area of island
graph
|
O(n*m) | Jul 11, 2022 |
No matching problems
Try clearing one of the filters.