Skip to content

EWU Fall '24, Professor Xu CSCD 320, Program 4 Kellan Burns

Notifications You must be signed in to change notification settings

kellanburns/java-TopoSort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java-TopoSort

This program creates a topologically sorted representation of a directed acyclic graph (DAG) using a depth first search algorithm. It reads in the graph from a user-provided file, and displays the traversal of points in the sorted order. While multiple outputs are possible for a given DAG, all outputs are guaranteed to maintain the ordering where all children of a node are displayed before the parent node. The program requires that the input graph is a DAG, meaning it will not work as intended if the input is undirected or contains any repeating loops or cycles.

Input:

<source node 1>: <destination>, <destination>
<source node 2>: <destination>, <destination>

Usage: javac Toposort.java, java Toposort <input.txt>

About

EWU Fall '24, Professor Xu CSCD 320, Program 4 Kellan Burns

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages