fix: three errors (#487)

This commit is contained in:
Ly 2020-08-21 13:23:44 +08:00 committed by GitHub
parent be185ac9af
commit c093fe4224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,7 +223,7 @@ end findMax
inorder(root)
Pre: root is the root node of the BST
Post: the nodes in the BST have been visited in inorder
if root = ø
if root != ø
inorder(root.left)
yield root.value
inorder(root.right)
@ -237,7 +237,7 @@ end inorder
preorder(root)
Pre: root is the root node of the BST
Post: the nodes in the BST have been visited in preorder
if root = ø
if root != ø
yield root.value
preorder(root.left)
preorder(root.right)
@ -251,7 +251,7 @@ end preorder
postorder(root)
Pre: root is the root node of the BST
Post: the nodes in the BST have been visited in postorder
if root = ø
if root != ø
postorder(root.left)
postorder(root.right)
yield root.value