Website Summary Files Commits Branches @commit @diff @stats
path: root / Seminar08 / height.cpp
blob: c11522869dff491311dd7f04f3122199b604f84b (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(height(tree->left), height(tree->right));
}

int main(){
  
}