summaryrefslogtreecommitdiff
path: root/prolog/problems/sorting/sins_3/common.py
blob: ba50e653be53d21797afd512cd9b1bf66c15ebf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# coding=utf-8

id = 122
group = 'sorting'
number = 29
visible = True
facts = None

solution = '''\
sins(X, [], [X]).
sins(X, [Y|T], [X,Y|T]) :-
  X =< Y.
sins(X, [Y|T], [Y|L]) :-
  X > Y,
  sins(X, T, L).
'''