Data Structures & Algorithms in C++
Goodrich, Tamassia, Mount and Goldwasser
Loading...
Searching...
No Matches
Namespaces | Functions
tree.h File Reference
#include <queue>
Include dependency graph for tree.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  dsac
 Code from the zyBook "Data Structures and Algorithms in C++" by Goodrich/Tamassia/Mount/Goldwasser.
 
namespace  dsac::tree
 Code from the chapter "Trees".
 

Functions

template<typename Position >
int dsac::tree::depth (Position p)
 returns the number of proper ancestors of p
 
template<typename Tree >
int dsac::tree::height_bad (const Tree &t)
 
template<typename Position >
int dsac::tree::height (Position p)
 
template<typename Position , typename Container >
void dsac::tree::preorder (Position p, Container &visited)
 
template<typename Position , typename Container >
void dsac::tree::postorder (Position p, Container &visited)
 
template<typename Position >
std::queue< Position > dsac::tree::breadthfirst (Position p)