Update binary_tree_traversal.md with review

This commit is contained in:
Spark 2024-09-20 16:05:06 -04:00 committed by GitHub
parent 1d397435a8
commit 4da4d8fda5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,6 @@
# Binary tree traversal # Binary tree traversal
From a physical structure perspective, trees are data structures based on linked lists. Hence, their traversal method involves accessing nodes one by one through pointers. However, trees are non-linear data structures, which makes traversing a tree more complex than traversing a linked list, requiring the assistance of search algorithms. From a physical structure perspective, a tree is a data structure based on linked lists. Hence, its traversal method involves accessing nodes one by one through pointers. However, a tree is a non-linear data structure, which makes traversing a tree more complex than traversing a linked list, requiring the assistance of search algorithms.
The common traversal methods for binary trees include level-order traversal, pre-order traversal, in-order traversal, and post-order traversal. The common traversal methods for binary trees include level-order traversal, pre-order traversal, in-order traversal, and post-order traversal.