     "source": [
      "**The following unit test is expected to fail until you solve the challenge.**"
     ]
    },
    {
     "cell_type": "code",
     "execution_count": null,
     "metadata": {
      "collapsed": true
     },
     "outputs": [],
     "source": [
      "%run ../tree_height/height.py"
     ]
    },
    {
     "cell_type": "code",
     "execution_count": null,
     "metadata": {
      "collapsed": false
 
</s> remove    "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%run ../tree_height/height.py"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
 </s> add  </s> remove    "execution_count": 5,
 </s> add    "execution_count": 4, </s> remove     "def create_min_bst(array):\n",
    "    # TODO: Implement me\n",
    "    # Calls _create_min_bst\n",
    "    pass    \n",
 </s> add     "class MinBst(object):\n", </s> remove     "\n",
    "def _create_min_bst(array, start, end):\n",
    "    # TODO: Implement me\n",
    "    pass"
 </s> add     "    def create_min_bst(self, array):\n",
    "    # TODO: Implement me" </s> remove     "def create_min_bst(array):\n",
    "    if array is None:\n",
    "        return\n",
    "    return _create_min_bst(array, 0, len(array)-1)\n",
    "\n",
    "\n",
    "def _create_min_bst(array, start, end):\n",
    "    if end < start:\n",
    "        return None\n",
    "    mid = (start + end) // 2\n",
    "    node = Node(array[mid])\n",
    "    node.left = _create_min_bst(array, start, mid-1)\n",
    "    node.right = _create_min_bst(array, mid+1, end)\n",
    "    return node"
 </s> add     "class MinBst(object):\n",
    "\n",
    "    def create_min_bst(self, array):\n",
    "        if array is None:\n",
    "            return\n",
    "        return self._create_min_bst(array, 0, len(array)-1)\n",
    "\n",
    "    def _create_min_bst(self, array, start, end):\n",
    "        if end < start:\n",
    "            return None\n",
    "        mid = (start + end) // 2\n",
    "        node = Node(array[mid])\n",
    "        node.left = self._create_min_bst(array, start, mid-1)\n",
    "        node.right = self._create_min_bst(array, mid+1, end)\n",
    "        return node"
     "source": [
      "**The following unit test is expected to fail until you solve the challenge.**"
     ]
    },











    {
     "cell_type": "code",
     "execution_count": null,
     "metadata": {
      "collapsed": false
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Move bst min to a class 
graphs_trees/bst_min/bst_min_challenge.ipynb