Merge branch 'krahets:master' into master

This commit is contained in:
Daniel 2023-01-10 21:45:25 +11:00 committed by GitHub
commit 83ed991d40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 8 deletions

View file

@ -133,7 +133,7 @@ int main() {
PrintUtil::printTree(bst->getRoot());
/* 查找结点 */
TreeNode* node = bst->search(5);
TreeNode* node = bst->search(7);
cout << endl << "查找到的结点对象为 " << node << ",结点值 = " << node->val << endl;
/* 插入结点 */

View file

@ -159,7 +159,7 @@ namespace hello_algo.chapter_tree
PrintUtil.PrintTree(bst.getRoot());
/* 查找结点 */
TreeNode? node = bst.search(5);
TreeNode? node = bst.search(7);
Console.WriteLine("\n查找到的结点对象为 " + node + ",结点值 = " + node.val);
/* 插入结点 */

View file

@ -20,8 +20,8 @@ func TestBinarySearchTree(t *testing.T) {
fmt.Println("\n二叉树的根结点为:", node.Val)
// 查找结点
node = bst.search(5)
fmt.Println("\n查找到的结点对象为", node, ",结点值 =", node.Val)
node = bst.Search(7)
fmt.Println("查找到的结点对象为", node, ",结点值 =", node.Val)
// 插入结点
node = bst.insert(16)

View file

@ -131,7 +131,7 @@ public class binary_search_tree {
PrintUtil.printTree(bst.getRoot());
/* 查找结点 */
TreeNode node = bst.search(5);
TreeNode node = bst.search(7);
System.out.println("\n查找到的结点对象为 " + node + ",结点值 = " + node.val);
/* 插入结点 */

View file

@ -126,7 +126,7 @@ console.log("\n初始化的二叉树为\n");
printTree(getRoot());
/* 查找结点 */
let node = search(5);
let node = search(7);
console.log("\n查找到的结点对象为 " + node + ",结点值 = " + node.val);
/* 插入结点 */

View file

@ -142,7 +142,7 @@ if __name__ == "__main__":
print_tree(bst.root)
# 查找结点
node = bst.search(5)
node = bst.search(7)
print("\n查找到的结点对象为: {},结点值 = {}".format(node, node.val))
# 插入结点

View file

@ -150,7 +150,7 @@ console.log('\n初始化的二叉树为\n');
printTree(getRoot());
/* 查找结点 */
let node = search(5);
let node = search(7);
console.log('\n查找到的结点对象为 ' + node + ',结点值 = ' + node!.val);
/* 插入结点 */