Tag: graph
Network Delay Time - Dijkstra's Algorithm
Date: 3/8/2024Tags:algorithmsleetcodeheap_sortgraphThe journal entry discusses the application of Dijkstra's Algorithm to find the shortest path to all nodes in a graph, explaining a step-by-step process followed by an implementation code that uses a min heap to calculate the network delay time between nodes effectively.
Network Delay Time - Breadth First Search Approach
Date: 3/7/2024Tags:algorithmsleetcodegraphbreadth_first_searchThe described journal entry presents a solution utilizing a breadth-first search strategy to efficiently solve the Network Delay Time problem, outperforming the depth-first search approach and ensuring optimal path allocation based on node distances in an adjacency list, with code implementing the algorithm for calculating network delay times for a given set of connections and source node.
Network Delay Time - Depth First Search Approach
Date: 3/7/2024Tags:algorithmsleetcodegraphdepth_first_searchThe journal entry explores a depth-first search approach for the Network Delay Time problem, updating distances between source nodes and vertices to find the maximum time needed, implemented in the provided code snippet.
Min Cost to Connect All Points
Date: 2/27/2024Tags:algorithmsleetcodeunion-findgraphminimum_spanning_treeThis journal entry discusses the application of Kruskal's algorithm to find the minimum cost to connect all points in a 2D plane using Union-Find data structure for tracking connected points and sorting edges based on Manhattan distances.
Walls and Gates - Depth-First Search
Date: 2/21/2024Tags:algorithmsleetcodegraphdepth_first_searchThe journal entry explores a depth-first search approach for the "Walls and Gates" problem, highlighting how it is faster than breadth-first search due to its ability to mark nodes with their shortest distance from a gate by exploring paths as far as possible before backtracking, contrasted with BFS's level-by-level exploration that can lead to redundant checks, presented alongside an accompanying DFS code implementation.