   end
 end
 
-array = [2, 3, 1, 5, 4]
+array = Enum.shuffle(1..50) # [2, 3, 1, 5, 4]
 
 array_sorted = Sort.quick(array, 0, length(array))
 

  def quick(arr, left, right) do
    {arr, index} = partition(arr, left, right)

    if (left < index - 1), do: arr = quick(arr, left, right - 1)
    if (index < right), do: arr = quick(arr, index, right)

    arr

      true ->
        if (i <= j) do
          arr = swap(arr, i, j)
          compare(arr, i+1, j-1, pivot)
        else
          {arr, i}
        end
    end
  end

