Skip to content

Commit ffc7c87

Browse files
Radhika ShahRadhika Shah
authored andcommitted
Adding example
1 parent 8b0f2fe commit ffc7c87

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

data_structures/binary_search_tree.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ void BFT(node *n) {
100100

101101
/*
102102
Prints the preorder traversal starting from the node n
103+
Prints root - leftChild - rightChild
103104
*/
104105
void Pre(node *n) {
105106
if (n != NULL) {
@@ -111,6 +112,7 @@ void Pre(node *n) {
111112

112113
/*
113114
Prints the inorder traversal starting from the node n
115+
Prints leftChild - root - rightChild
114116
*/
115117
void In(node *n) {
116118
if (n != NULL) {
@@ -122,6 +124,7 @@ void In(node *n) {
122124

123125
/*
124126
Prints the postorder traversal starting from the node n
127+
Prints left - rightChild - root
125128
*/
126129
void Post(node *n) {
127130
if (n != NULL) {

0 commit comments

Comments
 (0)