summaryrefslogtreecommitdiff
path: root/prolog/problems/sorting/quick_sort_2/en.py
blob: faf6d417cfd1684e506be7a4e756436e49e37561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# coding=utf-8

name = 'quick_sort/2'
slug = 'sort a list using quicksort'

description = '''\
<p><code>quick_sort(L, SL)</code>: the list <code>SL</code> contains the elements of <code>L</code> sorted in non-decreasing order. Use the predicate <code>pivoting/4</code> to implement quicksort.</p>
<pre>
  ?- quick_sort([2,3,1,5,4], L).
    L = [1,2,3,4,5].
</pre>'''

hint = {}