We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 382184b commit a63bc67Copy full SHA for a63bc67
1 file changed
PuzzleCoding/src/BTreeIterator.java
@@ -74,9 +74,12 @@ public Node preOrderNext() {
74
75
public Node postOrderNext() {
76
if (hasNext()) {
77
- if (stack.peek().right == null || leftVisitedStack.contains(stack.peek().right)) {
+ if (stack.peek().right == null ||
78
+ leftVisitedStack.contains(stack.peek().right)) {
79
+
80
Node node = stack.pop();
81
return node;
82
83
} else {
84
leftVisitedStack.push(stack.peek().right);
85
pushLeft(stack.peek().right);
0 commit comments