    {
     "cell_type": "code",
     "execution_count": null,
     "metadata": {
      "collapsed": true
     },
     "outputs": [],
     "source": [
      "def quick_sort(arr): \n",
      "     if len(arr) <= 1:\n",
 
</s> remove    "outputs": [],
 </s> add    "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Empty input\n",
      "One element\n",
      "Two or more elements\n",
      "Success: test_quick_sort\n",
      "\n",
      "Empty input\n",
      "One element\n",
      "Two or more elements\n",
      "Success: test_quick_sort\n",
      "\n"
     ]
    }
   ], </s> remove     "print('Empty input')\n",
    "data = []\n",
    "print(quick_sort(data))\n",
    "print('One element')\n",
    "data = [5]\n",
    "print(quick_sort(data))\n",
    "print('Two or more elements')\n",
    "data = [5, 1, 7, 2, 6, -3, 5, 7, -1]\n",
    "print(quick_sort(data))"
 </s> add     "def quick_sort_alt(arr): \n",
    "     if len(arr) <= 1:\n",
    "          return arr\n",
    "     else:\n",
    "          return quick_sort_alt([x for x in arr[1:] if x<arr[0]]) + [arr[0]] + quick_sort_alt([x for x in arr[1:] if x>=arr[0]])" </s> remove    "execution_count": null,
 </s> add    "execution_count": 3, </s> remove     "collapsed": false
 </s> add     "collapsed": true </s> remove    "execution_count": null,
 </s> add    "execution_count": 2,
    "collapsed": false
    {
     "cell_type": "code",
     "execution_count": null,
     "metadata": {
    "collapsed": false
     },
     "outputs": [],
     "source": [
      "def quick_sort(arr): \n",
      "     if len(arr) <= 1:\n",
keep keep keep keep replace keep keep keep keep keep
 Reworked notebook: Added more detail to constraints and test cases.  Reworked code and unit test. 
sorting-searching/quick-sort.ipynb