Bug fixes to C code.

This commit is contained in:
krahets
2023-11-01 05:14:22 +08:00
parent f7dd05e7a4
commit 355cc3a6b1
31 changed files with 246 additions and 219 deletions

View File

@ -58,7 +58,7 @@ public class PrintUtil {
}
/* Print a binary tree */
public static void printTree(TreeNode root, Trunk prev, boolean isLeft) {
public static void printTree(TreeNode root, Trunk prev, boolean isRight) {
if (root == null) {
return;
}
@ -70,7 +70,7 @@ public class PrintUtil {
if (prev == null) {
trunk.str = "———";
} else if (isLeft) {
} else if (isRight) {
trunk.str = "/———";
prev_str = " |";
} else {