summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2016-09-21 23:34:56 +0200
committerAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2016-09-21 23:34:56 +0200
commit8cbbbe0a57068556fb8195c8c47a998a51599d8d (patch)
treec4bdd2868dd1cc27dfc211ec6f047e6c026498f0
parent9e5d6dac0e32ecdce036041c878c290dc06599d9 (diff)
English translation for slowest_sort_ever/2 added.
-rw-r--r--prolog/problems/sorting/slowest_sort_ever_2/en.py44
1 files changed, 43 insertions, 1 deletions
diff --git a/prolog/problems/sorting/slowest_sort_ever_2/en.py b/prolog/problems/sorting/slowest_sort_ever_2/en.py
index 0e359b4..72a70bb 100644
--- a/prolog/problems/sorting/slowest_sort_ever_2/en.py
+++ b/prolog/problems/sorting/slowest_sort_ever_2/en.py
@@ -8,4 +8,46 @@ description = '''\
L = [1,2,3,4,5].
</pre>'''
-hint = {}
+plan = ['''\
+<p>This exercise is mostly for fun... all you need are two lines, i.e. two prolog goals.</p>
+''', '''\
+<p>Perhaps you can reuse some previous solutions?</p>
+''', '''\
+<p>Which of the previous solutions has time complexity of O(n!)? Use it!</p>
+''']
+
+hint = {
+ 'eq_instead_of_equ': '''\
+<p>The operator <code>==</code> is "stricter" than operator <code>=</code> in the sense that
+for the latter it is enough to be able to make the two operands equal (unification).</p>
+<p>Of course, you can also solve the exercise without explicit use of either of these two operators, just
+remember that unification is implicitly performed with the predicate's arguments (head of clause).</p>
+''',
+
+ 'eq_instead_of_equ_markup': '''\
+<p>Perhaps the operator for unification (=) would be better?</p>
+''',
+
+ 'predicate_always_false': '''\
+<p>It seems your predicate is <em>always</em> "false". Did you give it the correct name,
+or is it perhaps misspelled?</p>
+<p>If the name is correct, check whether something else is misspelled, perhaps there is a full stop instead of
+a comma or vice versa, or maybe you typed a variable name in lowercase?</p>
+<p>It is, of course, also possible that your conditions are too restrictive, or even impossible to satisfy
+(as would be, for example, the condition that <code>X</code> is <em>simultaneously</em> smaller and greater than
+<code>Y</code>, or something similarly impossible).</p>
+''',
+
+ 'timeout': '''\
+<p>Is there an infinite recursion at work here? How will it ever stop?</p>
+<p>Or perhaps is there a missing, faulty, or simply incompatible (with the general recursive case) base case?</p>
+''',
+
+ 'no_permute': '''\
+<p>Hmmm, which of the previous exercises has time complexity of O(n!)? How can you use it here?</p>
+''',
+
+ 'no_isSorted': '''\
+<p>You're on the right path, just a bit more to go. Perhaps you can reuse another previous exercise?</p>
+''',
+}