remove scala class, rename java class which is the stack sort
too simple graph, make it into a more complicated one where it has vertices
minor fixing and comments
solved problem using for comp and flatMap