summaryrefslogtreecommitdiff
path: root/prolog/problems/trees/mirrorbt_2/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'prolog/problems/trees/mirrorbt_2/common.py')
-rw-r--r--prolog/problems/trees/mirrorbt_2/common.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/prolog/problems/trees/mirrorbt_2/common.py b/prolog/problems/trees/mirrorbt_2/common.py
new file mode 100644
index 0000000..dc8d337
--- /dev/null
+++ b/prolog/problems/trees/mirrorbt_2/common.py
@@ -0,0 +1,12 @@
+id = 136
+group = 'trees'
+number = 43
+visible = True
+facts = None
+
+solution = '''\
+mirrorBT(nil, nil).
+mirrorBT(b(L, X, R), b(NewR, X, NewL)) :-
+ mirrorBT(L, NewL),
+ mirrorBT(R, NewR).
+'''