Skip to content

Commit c093fe4

Browse files
fix: three errors (trekhleb#487)
1 parent be185ac commit c093fe4

File tree

1 file changed

+3
-3
lines changed
  • src/data-structures/tree/binary-search-tree

1 file changed

+3
-3
lines changed

src/data-structures/tree/binary-search-tree/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ end findMax
223223
inorder(root)
224224
Pre: root is the root node of the BST
225225
Post: the nodes in the BST have been visited in inorder
226-
if root = ø
226+
if root != ø
227227
inorder(root.left)
228228
yield root.value
229229
inorder(root.right)
@@ -237,7 +237,7 @@ end inorder
237237
preorder(root)
238238
Pre: root is the root node of the BST
239239
Post: the nodes in the BST have been visited in preorder
240-
if root = ø
240+
if root != ø
241241
yield root.value
242242
preorder(root.left)
243243
preorder(root.right)
@@ -251,7 +251,7 @@ end preorder
251251
postorder(root)
252252
Pre: root is the root node of the BST
253253
Post: the nodes in the BST have been visited in postorder
254-
if root = ø
254+
if root != ø
255255
postorder(root.left)
256256
postorder(root.right)
257257
yield root.value

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy