Template Function ADS::cartesianBinaryTree
Defined in File BinaryTreeAlgorithms.h
Function Documentation
-
template<class T, class Compare = std::less<T>>
BinaryTree<T> *ADS::cartesianBinaryTree(const std::vector<T> &A, Compare less = {}) cartesianBinaryTree(): the Cartesian tree of A, the leftmost minimum by less at the root, a heap whose invisit is A, nil if A is empty; O( n ) time; the caller owns it
- Post:
the invisit is A (an audit)