      "    pivot_index = len(data) / 2\n",
      "    pivot_value = data[pivot_index]\n",
      "    \n",
      "    # Build the left and right partitions\n",
      "    for i in xrange(0, len(data)):\n",
      "        if i == pivot_index:\n",
      "            continue\n",
      "        if data[i] < pivot_value:\n",
      "            left.append(data[i])\n",
      "        else:\n",
 
</s> remove     "        for _ in xrange(0, iterations_to_compare_half):\n",
 </s> add     "        for _ in range(0, iterations_to_compare_half):\n", </s> remove     "    for i in xrange(1, cycles+1):\n",
 </s> add     "    for i in range(1, cycles+1):\n", </s> remove     "    for i in xrange(start + 1, len(data)):\n",
 </s> add     "    for i in range(start + 1, len(data)):\n", </s> remove     "    for r in xrange(1, len(data)):\n",
    "        for l in xrange(0, r):\n",
 </s> add     "    for r in range(1, len(data)):\n",
    "        for l in range(0, r):\n", </s> remove     "    for i in xrange(0, len(data) - 1):\n",
 </s> add     "    for i in range(0, len(data) - 1):\n",
    "    for i in range(0, len(data)):\n",
      "    pivot_index = len(data) / 2\n",
      "    pivot_value = data[pivot_index]\n",
      "    \n",
      "    # Build the left and right partitions\n",
    "    for i in range(0, len(data)):\n",
      "        if i == pivot_index:\n",
      "            continue\n",
      "        if data[i] < pivot_value:\n",
      "            left.append(data[i])\n",
      "        else:\n",
keep keep keep keep replace keep keep keep keep keep
 Changed xrange to range to be compatible with Python 3. 
sorting_searching/quick_sort/quick_sort_solution.ipynb