Skip to content

Commit 2ce5658

Browse files
committed
feat: improve bci for getString
fixes: #6
1 parent 4fb7392 commit 2ce5658

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/com/jwetherell/algorithms/data_structures/BinarySearchTree.java

+2
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,7 @@ private static <T extends Comparable<T>> String getString(Node<T> node, String p
680680
"has-left-children",
681681
"has-right-children",
682682
"has-children",
683+
"has-following-number-of-children",
683684
"has-multiple-children",
684685
"get-tree-string",
685686
});
@@ -716,6 +717,7 @@ private static <T extends Comparable<T>> String getString(Node<T> node, String p
716717
if (children != null) {
717718
scope.reached("has-children");
718719
for (int i = 0; i < children.size() - 1; i++) {
720+
scope.reached("has-following-number-of-children");
719721
builder.append(getString(children.get(i), prefix + (isTail ? " " : "│ "), false));
720722
}
721723
if (children.size() >= 1) {

0 commit comments

Comments
 (0)