Template Function ADS::searchTreeRange
Defined in File BinaryTreeAlgorithms.h
Function Documentation
-
template<KeyedBinaryNode N, class K, class F, class Compare = std::less<>>
std::size_t ADS::searchTreeRange(N t, const K &lo, const K &hi, F &&f, Compare less = {}) searchTreeRange(): f( u ) on the nodes u of the binary search tree t whose keys are in [ lo , hi ], in increasing order of the keys; the number of the nodes examined, at most k + 2 ( h + 1 ) for k keys in the range; O( h + k ) time
- Pre:
! less( hi , lo )