@RamilH/

QuickAgileFox-1

C++11

No description

fork
loading
Files
  • main.cpp
  • Album.cpp
  • Album.hpp
  • BST.hpp
  • test_interface.hpp

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.9877055493593296","path":"main.cpp","file":{"path":"main.cpp","content":{"asEncoding":{"base64":"I2luY2x1ZGUgInRlc3RfaW50ZXJmYWNlLmhwcCIKLy8gI2luY2x1ZGUgPGlvc3RyZWFtPgovLyAjaW5jbHVkZSAiQlNULmhwcCIKaW50IG1haW4oKQp7CiAgICBydW5UZXN0cygpOwogICAgLy8gQlNUPGludD4gdDsKICAgIC8vIHQuaW5zZXJ0KDY2KTsKICAgIC8vIHQuaW5zZXJ0KDQ0KTsKICAgIC8vIHQuaW5zZXJ0KDMzKTsKICAgIC8vIHQuaW5zZXJ0KDU1KTsKICAgIC8vIHQuaW5zZXJ0KDc3KTsKICAgIC8vIHQuaW5zZXJ0KDY4KTsKICAgIC8vIHQuaW5zZXJ0KDcyKTsKICAgIC8vIHQuaW5zZXJ0KDcwKTsKICAgIC8vIHQuaW5zZXJ0KDcxKTsKICAgIC8vIHQuaW5zZXJ0KDg4KTsKCiAgICAvLyBmb3IgKGF1dG8gaSA6IHQpCiAgICAvLyAgICAgc3RkOjpjb3V0IDw8IGkgPDwgJyAnOwogICAgLy8gc3RkOjpjb3V0IDw8ICdcbic7CgogICAgcmV0dXJuIDA7Cn0KLyoKICogICAgICAgICAgNjYKICogICAgICAgICAvICBcCiAqICAgICAgICAvICAgIFwKICogICAgICA0NCAgICAgNzcKICogICAgIC8gIFwgICAvICBcCiAqICAgMzMgIDU1ICA2OCAgODgKICogICAgICAgICAgICAgXAogKiAgICAgICAgICAgICAgNzIKICogICAgICAgICAgICAgLwogKiAgICAgICAgICAgNzAKICogICAgICAgICAgICAgXAogKiAgICAgICAgICAgICAgNzEKICovCi8vIGZ1bGwgdHJlZSBwcmVvcmRlciA6IDY2IDQ0IDMzIDU1IDc3IDY4IDcyIDcwIDcxIDg4Ci8vIGZ1bGwgdHJlZSBpbm9yZGVyICA6IDMzIDQ0IDU1IDY2IDY4IDcwIDcxIDcyIDc3IDg4Ci8vIGZ1bGwgdHJlZSBwb3N0b3JkZXI6IDMzIDU1IDQ0IDcxIDcwIDcyIDY4IDg4IDc3IDY2CgovLyBBZnRlciBkZWxldGluZyByb290IDY2Ci8qCiAqICAgICAgICAgICAgNjgKICogICAgICAgICAgIC8gIFwKICogICAgICAgICAgLyAgICBcCiAqICAgICAgICA0NCAgICAgIDc3CiAqICAgICAgIC8gIFwgICAgLyAgXAogKiAgICAgMzMgICA1NSAgNzIgICA4OAogKiAgICAgICAgICAgICAvCiAqICAgICAgICAgICA3MAogKiAgICAgICAgICAgICBcCiAqICAgICAgICAgICAgICA3MQogKi8KLy8gZnVsbCB0cmVlIHByZW9yZGVyIDogNjggNDQgMzMgNTUgNzcgNzIgNzAgNzEgODgKLy8gZnVsbCB0cmVlIGlub3JkZXIgIDogMzMgNDQgNTUgNjggNzAgNzEgNzIgNzcgODgKLy8gZnVsbCB0cmVlIHBvc3RvcmRlcjogMzMgNTUgNDQgNzEgNzAgNzIgODggNzcgNjg="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include "test_interface.hpp"
// #include <iostream>
// #include "BST.hpp"
int main()
{
    runTests();
    // BST<int> t;
    // t.insert(66);
    // t.insert(44);
    // t.insert(33);
    // t.insert(55);
    // t.insert(77);
    // t.insert(68);
    // t.insert(72);
    // t.insert(70);
    // t.insert(71);
    // t.insert(88);

    // for (auto i : t)
    //     std::cout << i << ' ';
    // std::cout << '\n';

    return 0;
}
/*
 *          66
 *         /  \
 *        /    \
 *      44     77
 *     /  \   /  \
 *   33  55  68  88
 *             \
 *              72
 *             /
 *           70
 *             \
 *              71
 */
// full tree preorder : 66 44 33 55 77 68 72 70 71 88
// full tree inorder  : 33 44 55 66 68 70 71 72 77 88
// full tree postorder: 33 55 44 71 70 72 68 88 77 66

// After deleting root 66
/*
 *            68
 *           /  \
 *          /    \
 *        44      77
 *       /  \    /  \
 *     33   55  72   88
 *             /
 *           70
 *             \
 *              71
 */
// full tree preorder : 68 44 33 55 77 72 70 71 88
// full tree inorder  : 33 44 55 68 70 71 72 77 88
// full tree postorder: 33 55 44 71 70 72 88 77 68