summaryrefslogtreecommitdiff
path: root/prolog/problems/trees/insertbt_3/sl.py
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-04-11 00:10:57 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-04-11 00:10:57 +0200
commitacce0e01cdb2a57cda35e040035dbf1da6b96031 (patch)
treee5a08e4a45893463e7bacfd82454a1a07fecba69 /prolog/problems/trees/insertbt_3/sl.py
parent169c995732f3840aae6750479b49a4d0bcd4b198 (diff)
Prolog: add test cases for the trees group
Diffstat (limited to 'prolog/problems/trees/insertbt_3/sl.py')
-rw-r--r--prolog/problems/trees/insertbt_3/sl.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/prolog/problems/trees/insertbt_3/sl.py b/prolog/problems/trees/insertbt_3/sl.py
new file mode 100644
index 0000000..f3339fd
--- /dev/null
+++ b/prolog/problems/trees/insertbt_3/sl.py
@@ -0,0 +1,14 @@
+name = 'insertBT/3'
+slug = 'vstavi element v binarno drevo'
+
+description = '''\
+<p><code>insertBT(X, T, NewT)</code>: binarno drevo <code>NewT</code> dobimo tako, da v <code>T</code> vstavimo element <code>X</code> na poljubno mesto. Tvoj program naj vrača vse možne rešitve.</p>
+<pre>
+?- insertBT(2, b(nil,1,nil), T).
+ T = b(b(nil,1,nil),2,nil) ;
+ T = b(nil,2,b(nil,1,nil)) ;
+ T = b(b(nil,2,nil),1,nil) ;
+ T = b(nil,1,b(nil,2,nil)).
+</pre>'''
+
+hint = {}