Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions exercises/in-order/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# In order

![Binary Tree In-Order](https://upload.wikimedia.org/wikipedia/commons/7/77/Sorted_binary_tree_inorder.svg "Binary Tree")

Output In-order: A, B, C, D, E, F, G, H, I.

Algorithm:
* Check if the current node is empty / null.
* Traverse the left subtree by recursively calling the in-order function.
* Display the data part of the root (or current node).
* Traverse the right subtree by recursively calling the in-order function.

In a search tree, in-order traversal retrieves data in sorted order