There was an error while loading. Please reload this page.
1 parent e0fa980 commit ff5fe62Copy full SHA for ff5fe62
src/main/java/de/moritzf/sorting/logic/sorting/TreeNode.java
@@ -44,7 +44,7 @@ public String toString() {
44
public TreeNode<T> getNode(int index) {
45
Queue<TreeNode<T>> queue = new LinkedList<>();
46
queue.add(this.getRootNode());
47
- int breathSearchNiv = 1;
+ int breathSearchNiv = 0;
48
TreeNode<T> currentNode = null;
49
while (breathSearchNiv < index && !queue.isEmpty()) {
50
currentNode = queue.poll();
0 commit comments