Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 711 Bytes

File metadata and controls

34 lines (28 loc) · 711 Bytes

Shortest Path Finder (Java)

Overview

A console-based program to find the shortest path between nodes in a graph using Dijkstra's Algorithm.

Features

  • Accepts user input for graph vertices, edges, and weights.
  • Calculates shortest distance from a given source vertex.
  • Displays the path from source to each vertex.
  • Demonstrates graph algorithms, recursion, and problem-solving skills.

Sample Input

Vertices: 5 Edges: 7 Edges (from to weight): 0 1 10 0 4 5 1 2 1 1 4 2 2 3 4 3 0 7 4 2 9 Source: 0

How to Run

  1. Compile: javac ShortestPathApp.java
  2. Run: java ShortestPathApp
  3. Enter input as prompted.

Technologies

  • Java
  • VS Code
  • Dijkstra's Algorithm