https://github.com/ivanbgd/binary-tree-traversals
Binary Tree Traversals
https://github.com/ivanbgd/binary-tree-traversals
binary-tree binary-tree-traversal binary-trees in-order post-order pre-order
Last synced: 3 months ago
JSON representation
Binary Tree Traversals
- Host: GitHub
- URL: https://github.com/ivanbgd/binary-tree-traversals
- Owner: ivanbgd
- License: mit
- Created: 2017-11-16T00:26:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-16T00:39:42.000Z (over 7 years ago)
- Last Synced: 2025-02-03T10:11:58.781Z (5 months ago)
- Topics: binary-tree, binary-tree-traversal, binary-trees, in-order, post-order, pre-order
- Language: C
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Binary-Tree-Traversals
Contains both recursive and iterative implementations of in-order, pre-order, and post-order binary tree traversals.The traversal algorithms are the same between the different files. The differences are in passing into and returning from functions.
Trees don't have to be binary search trees to use these traversal algorithms, meaning, they don't have to be in sorted order. These functions will traverse any binary tree. These functions don't do anything with nodes that they visit, but a user can call their function visit() which will do a desired thing with a node. It is noted in the code where it's appropriate to call the function.