Hi,
- This algorithme will have a O(n) complexity : you will check all the tree, so the "binary" particularity doesn't change things.
- cout excutes :
1+3+6+10+15+21+...
Sum of (1+m)(m/2) and m changes from 1 to n
To simplify, it will b a O(n³) (I think)