Skip to content

Commit b72015e

Browse files
authored
Update TreeStartingCode.cpp
1 parent 879ceec commit b72015e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

TreeStartingCode.cpp

+23
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,26 @@ struct TreeNode {
66
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
77
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
88
};
9+
10+
11+
//***************************************************************************************************************//
12+
13+
class node {
14+
public:
15+
char value;
16+
node* left;
17+
node* right;
18+
node* next = NULL;
19+
node(char c)
20+
{
21+
this->value = c;
22+
left = NULL;
23+
right = NULL;
24+
}
25+
node()
26+
{
27+
left = NULL;
28+
right = NULL;
29+
}
30+
31+
};

0 commit comments

Comments
 (0)