59 try { n =
stoi(
argv[1]); }
catch (...) { n = 1000; }
62 unsigned int t = std::time(0);
65 try { t =
stoul(
argv[2]); }
catch (...) { t = std::time(0); }
70 cout <<
argv[0] <<
" " << n <<
" " << t <<
endl;
80 cerr <<
"Error: n must be greater than 2 for meaningful tree splitting." <<
endl;
84 for (
int i = 0; i < n; i++)
107 cout <<
"Left Tree" <<
endl;
111 cout <<
"Right Tree" <<
endl;
Core header for the Aleph-w library.
size_t size_t int32_t value
Node for binary search tree.
Node *& getRoot() noexcept
Return the root of tree.
Node * insert(Node *p) noexcept
Insert a node in the tree.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
bool split_key_rec(Node *&root, const typename Node::key_type &key, Node *&ts, Node *&tg, const Compare &cmp=Compare()) noexcept
Split recursively according to a key.
bool check_bst(Node *p, const Compare &cmp=Compare())
Return true if p is a binary search tree.
void preOrderThreaded(Node *node, void(*visitFct)(Node *))
Traverse preorder a binary tree without recursion and without stack.
void destroyRec(Node *&root) noexcept
Free recursively all the memory occupied by the tree root
Main namespace for Aleph-w library functions.
Binary search tree with nodes without virtual destructors,.
static void printNode(BinNode< int > *node)
Utility functions for binary tree operations.
Generic unbalanced binary search tree.