mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-13 17:29:52 +08: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:
@@ -223,7 +223,7 @@ template <typename T, typename S, typename C> void printHeap(priority_queue<T, S
|
||||
cout << "堆的数组表示:";
|
||||
printVector(vec);
|
||||
cout << "堆的树状表示:" << endl;
|
||||
TreeNode *root = vecToTree(vec);
|
||||
TreeNode *root = vectorToTree(vec);
|
||||
printTree(root);
|
||||
freeMemoryTree(root);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user