This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -m master newname | |
git push origin newname | |
# Change "Default Branch" in settings/options in GitHub | |
git push --delete origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class BreadthFirstIterator<T> implements Iterator<T> { | |
private Set<T> visited = new HashSet<>(); | |
private Queue<T> queue = new LinkedList<>(); | |
private Graph<T> graph; | |
public BreadthFirstIterator(Graph<T> g, T startingVertex) { | |
if(g.isVertexExist(startingVertex)) { | |
this.graph = g; |