blob: 9fba6acb0b5eec330ce2417e4671c4fdcea62b36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# coding=utf-8
name = 'isort/2'
slug = 'sort a list using insertion sort'
description = '''\
<p><code>isort(L, SL)</code>: the list <code>SL</code> contains the elements of <code>L</code> sorted in non-decreasing order. Use the predicate <code>sins/3</code> to implement insertion sort.</p>
<pre>
?- isort([2,3,1,5,4], L).
L = [1,2,3,4,5].
</pre>'''
hint = {}
|