mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-01 10:04:23 +00:00
Add implementation of array binary tree.
Rewrite the tree serialization and deserialization methods. Add applications of array and linked list.
This commit is contained in:
@@ -29,7 +29,7 @@ static void preOrder(TreeNode *root) {
|
||||
|
||||
/* Driver Code */
|
||||
int main() {
|
||||
TreeNode *root = vecToTree(vector<int>{1, 7, 3, 4, 5, 6, 7});
|
||||
TreeNode *root = vectorToTree(vector<int>{1, 7, 3, 4, 5, 6, 7});
|
||||
cout << "\n初始化二叉树" << endl;
|
||||
printTree(root);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user