Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "BinaryTree.h"
- int main() {
- BinaryTree<int> test;
- test.addElement("", 1);
- test.addElement("L", 2);
- test.addElement("R", 3);
- test.addElement("LL", 4);
- test.addElement("LR", 5);
- test.addElement("LLL", 8);
- test.addElement("LLR", 9);
- test.addElement("LRL", 10);
- test.addElement("LRR", 11);
- test.addElement("RL", 6);
- test.addElement("RR", 7);
- test.addElement("RLL", 12);
- test.addElement("RLR", 13);
- test.addElement("RRL", 14);
- test.addElement("RRR", 15);
- test.addLeft(111);
- test.addRight(888);
- test.prettyPrint(cout);
- cout << "\n\n";
- cout << test.member(16) << endl;
- cout << test.sum() << endl;
- cout << test.getSize() << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement