@@ -0,0 +1,840 @@
+package data_structures.trees;%0D%0A%0D%0A/*%0D%0A * Problem Statement:%0D%0A * The height of a binary tree is the number of nodes on the largest path from%0D%0A * root to any leaf. You are given a pointer to the root of a binary tree.%0D%0A * Return the height of the tree.%0D%0A * You only have to complete the function.%0D%0A * %0D%0A * Input Format: %0D%0A * You are given a function,%0D%0A * %0D%0A * int height_of_bt(node * root)%0D%0A * %7B%0D%0A * %0D%0A * %7D%0D%0A * %0D%0A * Output Format: %0D%0A * Return a single value equal to the height of the binary tree.%0D%0A * %0D%0A * Sample Input: %0D%0A *       3%0D%0A *      /  %5C%0D%0A *     5    2%0D%0A *    / %5C  /%0D%0A *   1  4 6%0D%0A *       /%0D%0A *      7%0D%0A *      %0D%0A * Sample Output: %0D%0A * 4%0D%0A */%0D%0Apublic class HeightOfABinaryTree %7B%0D%0A%0D%0A%09int height(Node root) %7B%0D%0A%09%09if (root == null) %7B%0D%0A%09%09%09return 0;%0D%0A%09%09%7D else %7B%0D%0A%09%09%09return 1 + Math.max(height(root.left), height(root.right));%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%7D

Add HeightOfABinaryTree