{"id":19982674,"url":"https://github.com/nikhil-jindal12/shortestpathalgorithm","last_synced_at":"2025-03-01T20:13:11.164Z","repository":{"id":211015602,"uuid":"727942496","full_name":"nikhil-jindal12/ShortestPathAlgorithm","owner":"nikhil-jindal12","description":"Contains implementation for an airport system that uses Dijkstra's and Prim's Algorithm's to find the shortest paths.","archived":false,"fork":false,"pushed_at":"2023-12-22T01:57:24.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T10:48:29.730Z","etag":null,"topics":["dijkstra-algorithm","java-8","javadoc-documentation","prim-algorithm"],"latest_commit_sha":null,"homepage":"https://nikhil-jindal12.github.io/ShortestPathAlgorithm/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikhil-jindal12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-05T22:29:45.000Z","updated_at":"2023-12-22T01:58:07.000Z","dependencies_parsed_at":"2023-12-22T03:54:23.551Z","dependency_job_id":"5f0421d2-8793-48fa-907a-62fa180e7cd7","html_url":"https://github.com/nikhil-jindal12/ShortestPathAlgorithm","commit_stats":null,"previous_names":["nikhil-jindal12/shortestpathalgorithm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil-jindal12%2FShortestPathAlgorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil-jindal12%2FShortestPathAlgorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil-jindal12%2FShortestPathAlgorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil-jindal12%2FShortestPathAlgorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikhil-jindal12","download_url":"https://codeload.github.com/nikhil-jindal12/ShortestPathAlgorithm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241418356,"owners_count":19959736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dijkstra-algorithm","java-8","javadoc-documentation","prim-algorithm"],"created_at":"2024-11-13T04:12:31.427Z","updated_at":"2025-03-01T20:13:11.144Z","avatar_url":"https://github.com/nikhil-jindal12.png","language":"Java","readme":"# ShortestPathAlgorithm\n\nThis repository contains two classes: `AirportSystem.java` and `AirportSystemTesting.java`. These two classes create a fake airport system/graph that organizes and creates an application with the following functionalities:\n- Create an airport system that stores the city connection information\n- Finds the shortest path from city A to city B using Dijkstra's algorithm\n- Finds the minimum spanning tree of a graph using Prim's algorithm\n\n----\n\n### Implementation\n\n#### Edge\nEdge is a private nested class of `AirportSystem.java` that contains the following:\n- `String toString()` - the String representation of the edge in the format of \"[start, destination]\"\n\n#### Vertex\nVertex is another private nested class of `AirportSystem.java` that contains the following implementation:\n- `String toString()` - the String representation of the vertex in the format of \"id\"\n\n#### AirportSystem\n- `HashMap\u003cString, Vertex\u003e connections` - an adjacency list of all of the flight connections\n- `boolean addEdge(String source, String destination, int weight)` - adds a new edge to the connections list, returning false if the edge already exists or the weight is negative\n- `int shortestDistance(String cityA, String cityB)` - returns the shortest distance between cityA and cityB using Dijkstra's algorithm\n- `List\u003cEdge\u003e minimumSpanningTree()` - creates a minimum spanning tree of the airport system using Prim's algorithm\n- `List\u003cString\u003e breadthFirstSearch(String start)` - returns a list of all of the cities from the starting city using BFS, assuming that the start vertex exists\n- `void printGraph()` - prints the graph in a readable format to the terminal window\n\n----\n\n### JUnit Testing\n\nThe `AirportSystemTesting.java` class contains some JUnit tests for the `shortestDistance()` method and the `minimumSpanningTree()` method. All of the tests pass, which proves that both Dijkstra's and Prim's Algorithms are coded properly.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhil-jindal12%2Fshortestpathalgorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikhil-jindal12%2Fshortestpathalgorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhil-jindal12%2Fshortestpathalgorithm/lists"}