Website Summary Files Commits Branches @commit @diff @stats
path: root / Seminar08 / height.cpp
blob: 97ba9abf5852f4f5c346c83fcfb2633cd3f275a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include"tree-utils.h"
#include<iostream>

template<typename T>
size_t height(const Tree<T>* tree) {
	if (!tree)
		return 0;

	return 1 + std::max(heightOfTree(tree->left), heightOfTree(tree->right));
}

int main(){
  
}