blob: 34574400054fc51731acca8505ecfed2b46cffa2 (
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 = {}
|