📜  bst java代码示例的打印值

📅  最后修改于: 2022-03-11 14:52:16.401000             🧑  作者: Mango

代码示例1
void printTree(TreeNode node, String prefix)
 {
    if(node == null) return;

    System.out.println(prefix + " + " + node.data);
    printTree(node.left , prefix + " ");
    printTree(node.right , prefix + " ");
 }