[codility]Tree-height
来源:互联网 发布:淘宝客服服务态度培训 编辑:程序博客网 时间:2024/06/14 14:11
// you can also use includes, for example:// #include <algorithm>int getDepth(tree* T){ if(!T) return 0; return max(getDepth(T->l), getDepth(T->r))+1;}int solution(tree * T) { // write your code in C++98 return getDepth(T)-1;}
- [codility]Tree-height
- Minimum height tree
- codility
- codility
- The height of binary tree
- C++: Find height of a Binary Tree
- Compute the height of a binary tree
- height
- Compute the height of a binary search tree
- Codility -- Fish
- Codility -- Brackets
- Codility -- grocery_store
- Codility -- Triangle
- [codility]Triangle
- [codility]Brackets
- [codility]Fish
- [codility]Dominator
- [codility]Equi
- java中参数数量可变的方法
- 第一个struts2程序
- [codility]Max-profit
- assert的用法
- java 反射机制
- [codility]Tree-height
- 程控交换课外实习报告
- Android 的 init.rc 文件简介
- OpenRisc-58-ORPSoC调试环境的构建
- [codility]Prefix-set
- UVA 10803 - Thunder Mountain(floyd)
- [codility]Array-inversion-count
- 时分复用
- LeetCode Letter Combinations of a Phone Number 经典组合问题