       ]
      }
     ],
     "source": [
      "def height(node):\n",
      "    if node is None:\n",
      "        return 0\n",
      "    return 1 + max(height(node.left), \n",
 
</s> remove    "outputs": [],
 </s> add    "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Writing height.py\n"
     ]
    }
   ], </s> remove    "execution_count": 4,
 </s> add    "execution_count": 5, </s> remove    "execution_count": 3,
 </s> add    "execution_count": 4,
    "%%writefile height.py\n",
       ]
      }
     ],
     "source": [
    "%%writefile height.py\n",
      "def height(node):\n",
      "    if node is None:\n",
      "        return 0\n",
      "    return 1 + max(height(node.left), \n",
keep keep keep add keep keep keep keep
 Saved tree height challenge solution so it can be reused as a component to other related challenges. 
graphs_trees/tree_height/height_solution.ipynb