diff options
Add sem08
1 files changed, 28 insertions, 0 deletions
| -rw-r--r-- | Seminar08/src/BST/tests.cpp | 28 |
diff --git a/Seminar08/src/BST/tests.cpp b/Seminar08/src/BST/tests.cpp new file mode 100644 index 0000000..e1ba15e --- /dev/null +++ b/Seminar08/src/BST/tests.cpp @@ -0,0 +1,28 @@ +#include "indexable-bst.hpp" + +int main() +{ + Bst<int> bst; + + for (size_t i = 0; i < 100; i++) + { + bst.insert(i); + } + + for (size_t i = 0; i < bst.getSize(); i++) + { + std::cout << bst.index(i) << " "; + } + + std::cout << std::endl; + + for (size_t i = 0; i < 50; i++) + { + bst.remove(i); + } + + for (size_t i = 0; i < bst.getSize(); i++) + { + std::cout << bst.index(i) << " "; + } +}
\ No newline at end of file |
