Template Struct OptimalSearchTree

Struct Documentation

template<class T>
struct OptimalSearchTree

an optimal binary search tree on the keys 0 .

. n - 1: its cost, its root and the children of each key, -1 for none (and for the root of the empty tree)

Public Members

T cost

the weighted path length

int root

the key at the root

std::vector<int> left

the left child of each key

std::vector<int> right

the right child of each key