Tag: breadth_first_search
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.
Walls and Gates - Breadth-First Search
Date: 2/21/2024Tags:algorithmsleetcodegraphbreadth_first_searchThe journal entry "Walls and Gates - Breadth-First Search" discusses a breadth-first search algorithm for the Walls and Gates problem, ensuring correct assignment of values to nodes based on neighbors' values while avoiding potential incorrect assignments and includes the corresponding JavaScript code implementing the algorithm.
Pacific Atlantic Water Flow - Breadth First Search
Date: 2/21/2024Tags:algorithmsleetcodegraphbreadth_first_searchThe journal entry discusses a breadth-first search approach for the "Pacific Atlantic Water Flow" problem, highlighting considerations such as potential redundancy of checking cells multiple times and the necessity of accurately determining whether a queue is empty in the context of the problem's implementation.
Rotting Oranges - 3rd attempt
Date: 2/15/2024Tags:algorithmsleetcodebreadth_first_searchThe journal entry discusses the problem of finding the shortest path to all reachable fresh oranges in a directed graph, utilizing a breadth-first search algorithm. It also includes a code implementation in JavaScript using a queue to track the rotten oranges and count the time taken.
Rotting Oranges - 2nd attempt
Date: 2/14/2024Tags:algorithmsleetcodegraphbreadth_first_searchThe code implements the BFS algorithm to solve the problem of rotting oranges on a grid, tracking the time required and returning the total time or -1 if not all oranges can be rottened.