61 try { n =
stoi(
argv[1]); }
catch (...) { n = 1000; }
66 cerr <<
"n must be positive" <<
endl;
70 unsigned int t = std::time(0);
74 try { t =
stoul(
argv[2]); }
catch (...) { t = std::time(0); }
81 cout <<
argv[0] <<
" " << n <<
" " << t <<
endl;
84 cout <<
root->get_key() <<
" ";
86 array[0] =
root->get_key();
92 for (i = 1; i < n; i++)
102 cout <<
value <<
" ";
132 cout <<
value <<
" ";
Core header for the Aleph-w library.
size_t size_t int32_t value
Node for binary search tree.
__gmp_expr< T, __gmp_binary_expr< __gmp_expr< T, U >, unsigned long int, __gmp_root_function > > root(const __gmp_expr< T, U > &expr, unsigned long int l)
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Node * remove_from_bst(Node *&root, const typename Node::key_type &key, const Compare &cmp=Compare()) noexcept
Remove a key from a binary search tree.
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
Node * searchInBinTree(Node *root, const typename Node::key_type &key, const Compare &cmp=Compare()) noexcept
Search a key in a binary search tree.
Node * insert_root(Node *&root, Node *p, const Compare &cmp=Compare()) noexcept
Insert the node p as root of a binary search tree.
Main namespace for Aleph-w library functions.
static void printNode(BinNode< int > *node)
Utility functions for binary tree operations.
Basic binary tree node definitions.
Lazy and scalable dynamic array implementation.