moving graph algorithms in java to their own directory