Skip to content

Commit

Permalink
深度优先和广度优先
Browse files Browse the repository at this point in the history
  • Loading branch information
Xikl committed Jan 9, 2019
1 parent db6c446 commit d399ba0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private boolean contains(Node node, E element) {
/**
* 非递归前序遍历
* 根左右
*
* 深度优先遍历
*/
public void inOrderNR() {
if (root == null) {
Expand All @@ -146,8 +146,8 @@ public void inOrderNR() {
}

/**
* breadth-first
* 深度优先遍历
* 层序遍历
* 广度优先遍历
*/
public void levelOrder() {
Queue<Node> queue = new LinkedList<>();
Expand Down

0 comments on commit d399ba0

Please sign in to comment.