Arka Infotecharkainfotech.hashnode.dev·Jan 11, 2025Bellman-Ford Algorithm vs Dijkstra: A ComparisonIntroduction When solving shortest path problems in graph theory, Bellman-Ford Algorithm and Dijkstra’s Algorithm are two of the most prominent approaches. While both aim to find the shortest path from a source node to other nodes in a graph, their m...BellmanFord
Arka Infotecharkainfotech.hashnode.dev·Jan 10, 2025Graph Algorithms Every Developer Should KnowIntroduction Graphs are a fundamental data structure used to model relationships and connections in various domains, from social networks to transportation systems and even the internet. A graph consists of vertices (or nodes) and edges (or arcs) con...10 likescoding
Teja Illaakadurga.hashnode.dev·Oct 2, 2024Djikstra Algorithm in JavaDjikstra Algorithm in Java import java.util.*; public class Main { public static class Node implements Comparable<Node> { public int vertices; public int distance; public Node(int vertices, int distance) { this.vertices = vert...graph algorithms
Mehreen Mallick Fionarosiechan.hashnode.dev·Sep 5, 2024Finding the Shortest Route: Exploring Dijkstra's AlgorithmWhat is Dijkstra's Algorithm? Dijkstra's Algorithm is a renowned algorithm used to find the shortest paths between nodes in a graph. It is widely used in routing and as a foundation for various network-related applications. Whether you're navigating ...40 readsgraph-algo
Saurabh vermaedunode.hashnode.dev·Feb 4, 2024Dijkstra’s Algorithm —In this article we are going to understand one of the most popular distance finding algorithm with non-negative edge weights in Graph. (Source: Wikipedia) Problem Statement: Given a weighted graph G with vertices V and edges E, and a source vertex s...1 likealgorithms
Jonathan Rufus Samueldijkstra.hashnode.dev·Sep 29, 2023Two Sum - Leetcode #1Question Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can ret...array
Anton Yarkovoptiklab.hashnode.dev·Sep 17, 2023Exploring well-known path finding algorithms with SFML graphics libraryIntro As someone who is not a professional game developer, I have always been curious about different concepts and enjoy exploring topics that are not directly related to my daily routine. Throughout my career, I have often found myself working on sm...1 like·27 readsA-Star
Anton Yarkovoptiklab.hashnode.dev·Sep 16, 2023Universal implementation of BFS, DFS, Dijkstra and A-Star algorithmsIt turns out that well-known algorithms like BFS, DFS, Dijkstra, and A-Star are essentially variations of the same algorithm. In other words, it is possible to implement a universal data structure that can switch between these algorithms without requ...BFS
khandoker ananblog.khandokeranan.com·Sep 1, 2023Popular algorithm and passings for single source shortest pathThree commonly used methods for determining the shortest path from a single starting node require a fundamental understanding of graphs. These algorithms are as follows: Shortest path in a Directed Acyclic Graph (DAG) using topological sorting The ...54 readsdijkstra
Peter Hrobardihjital.hashnode.dev·May 2, 2023Finding the shortest path in a weighted graph with PHPIn my last article, I shared my code for searching a path in a graph using breath first search. BFS works well if the graph is not weighted. By the way, if the weight is 1 (or any other constant) for each edge then BFS is finding a similar path like ...PHP