diff --git a/trees/README.md b/trees/README.md index 679aa4a..29fd54a 100644 --- a/trees/README.md +++ b/trees/README.md @@ -15,6 +15,18 @@
+#### find height + +
+ +```python +def height(root): + if not root: + return -1 + return 1 + max(height(root.left), height(root.right)) +```` + +
----