From 388b32039898cc8f1784378689007254eb7a33b6 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 13 Jan 2016 13:51:15 +0100 Subject: Remove space-padding from
 blocks

---
 prolog/problems/trees/deletebt_3/en.py |  8 ++++----
 prolog/problems/trees/depthbt_2/en.py  |  4 ++--
 prolog/problems/trees/insertbt_3/en.py | 10 +++++-----
 prolog/problems/trees/maxt_2/en.py     |  4 ++--
 prolog/problems/trees/memberbt_2/en.py |  8 ++++----
 prolog/problems/trees/membert_2/en.py  |  8 ++++----
 prolog/problems/trees/mirrorbt_2/en.py |  4 ++--
 prolog/problems/trees/numberbt_2/en.py |  4 ++--
 prolog/problems/trees/tolistbt_2/en.py |  4 ++--
 9 files changed, 27 insertions(+), 27 deletions(-)

(limited to 'prolog/problems/trees')

diff --git a/prolog/problems/trees/deletebt_3/en.py b/prolog/problems/trees/deletebt_3/en.py
index 215fced..eedab0a 100644
--- a/prolog/problems/trees/deletebt_3/en.py
+++ b/prolog/problems/trees/deletebt_3/en.py
@@ -6,10 +6,10 @@ slug = 'delete an element from a binary tree'
 description = '''\
 

deleteBT(X, T, NewT): the binary tree NewT is obtained from T by deleting one occurence of the element X. If X is not a leaf node, the root of one of its subtrees is moved up. Your code should generate all valid solutions.

-  ?- deleteBT(1, b(b(b(nil,4,nil),2,b(nil,6,nil)),1,b(nil,3,b(nil,5,nil))), T).
-    T = b(b(nil,4,b(nil,6,nil)),2,b(nil,3,b(nil,5,nil))) ;
-    T = b(b(b(nil,4,nil),6,nil),2,b(nil,3,b(nil,5,nil))) ;
-    T = b(b(b(nil,4,nil),2,b(nil,6,nil)),3,b(nil,5,nil)).
+?- deleteBT(1, b(b(b(nil,4,nil),2,b(nil,6,nil)),1,b(nil,3,b(nil,5,nil))), T).
+  T = b(b(nil,4,b(nil,6,nil)),2,b(nil,3,b(nil,5,nil))) ;
+  T = b(b(b(nil,4,nil),6,nil),2,b(nil,3,b(nil,5,nil))) ;
+  T = b(b(b(nil,4,nil),2,b(nil,6,nil)),3,b(nil,5,nil)).
 
''' hint = {} diff --git a/prolog/problems/trees/depthbt_2/en.py b/prolog/problems/trees/depthbt_2/en.py index 94fec48..c3f7d4c 100644 --- a/prolog/problems/trees/depthbt_2/en.py +++ b/prolog/problems/trees/depthbt_2/en.py @@ -6,8 +6,8 @@ slug = 'find the depth of a binary tree' description = '''\

depthBT(T, D): D is the depth of the binary tree T.

-  ?- depthBT(b(b(b(nil,4,nil),2,b(nil,6,nil)),1,nil), D).
-    D = 3.
+?- depthBT(b(b(b(nil,4,nil),2,b(nil,6,nil)),1,nil), D).
+  D = 3.
 
''' hint = {} diff --git a/prolog/problems/trees/insertbt_3/en.py b/prolog/problems/trees/insertbt_3/en.py index 08eb2cd..c0fa47c 100644 --- a/prolog/problems/trees/insertbt_3/en.py +++ b/prolog/problems/trees/insertbt_3/en.py @@ -6,11 +6,11 @@ slug = 'insert an element into a binary tree' description = '''\

insertBT(X, T, NewT): the binary tree NewT is obtained from T by inserting the element X at a certain position. This is the opposite of the predicate deleteBT/3. Your code should generate all valid solutions.

-  ?- 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)).
+?- 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)).
 
''' hint = {} diff --git a/prolog/problems/trees/maxt_2/en.py b/prolog/problems/trees/maxt_2/en.py index 20db52e..bb222f8 100644 --- a/prolog/problems/trees/maxt_2/en.py +++ b/prolog/problems/trees/maxt_2/en.py @@ -6,8 +6,8 @@ slug = 'find the greatest element in a tree' description = '''\

maxT(Tree, Max): Max is the greatest element in the tree Tree.

-  ?- maxT(t(1, t(2), t(3)), Max).
-    Max = 3.
+?- maxT(t(1, t(2), t(3)), Max).
+  Max = 3.
 
''' hint = {} diff --git a/prolog/problems/trees/memberbt_2/en.py b/prolog/problems/trees/memberbt_2/en.py index e8d48f2..1559151 100644 --- a/prolog/problems/trees/memberbt_2/en.py +++ b/prolog/problems/trees/memberbt_2/en.py @@ -6,10 +6,10 @@ slug = 'find elements in a binary tree' description = '''\

memberBT(X, T): X is an element of the binary tree T. A binary tree node is represented with the structure b(L, E, R), where L and R are left and right subtrees, respectively, and E is the node's value. An empty tree is denoted by nil.

-  ?- memberBT(X, b(b(nil,2,nil),1,b(nil,3,nil))).
-    X = 1 ;
-    X = 2 ;
-    X = 3.
+?- memberBT(X, b(b(nil,2,nil),1,b(nil,3,nil))).
+  X = 1 ;
+  X = 2 ;
+  X = 3.
 
''' hint = {} diff --git a/prolog/problems/trees/membert_2/en.py b/prolog/problems/trees/membert_2/en.py index 738d625..ef48931 100644 --- a/prolog/problems/trees/membert_2/en.py +++ b/prolog/problems/trees/membert_2/en.py @@ -6,10 +6,10 @@ slug = 'find elements in a tree' description = '''\

memberT(X, T): X is an element of the tree T. A tree node is represented with the structure t(E, T1, T2...), where E is the node's value, followed by any number of subtrees. An empty tree is denoted by nil.

-  ?- memberT(X, t(3, t(1), t(2))).
-    X = 3 ;
-    X = 1 ;
-    X = 2.
+?- memberT(X, t(3, t(1), t(2))).
+  X = 3 ;
+  X = 1 ;
+  X = 2.
 
''' hint = {} diff --git a/prolog/problems/trees/mirrorbt_2/en.py b/prolog/problems/trees/mirrorbt_2/en.py index 85c2a54..7bc622f 100644 --- a/prolog/problems/trees/mirrorbt_2/en.py +++ b/prolog/problems/trees/mirrorbt_2/en.py @@ -6,8 +6,8 @@ slug = 'flip a binary tree horizontally' description = '''\

mirrorBT(T, NewT): the binary tree NewT is obtained from T by flipping it over the vertical axis through the root node.

-  ?- mirrorBT(b(b(b(nil,4,nil),2,b(nil,5,nil)),1,b(nil,3,nil)), X).
-    X = b(b(nil,3,nil), 1, b(b(nil,5,nil), 2, b(nil,4,nil))).
+?- mirrorBT(b(b(b(nil,4,nil),2,b(nil,5,nil)),1,b(nil,3,nil)), X).
+  X = b(b(nil,3,nil), 1, b(b(nil,5,nil), 2, b(nil,4,nil))).
 
''' hint = {} diff --git a/prolog/problems/trees/numberbt_2/en.py b/prolog/problems/trees/numberbt_2/en.py index 3be193d..99dc9ca 100644 --- a/prolog/problems/trees/numberbt_2/en.py +++ b/prolog/problems/trees/numberbt_2/en.py @@ -6,8 +6,8 @@ slug = 'find the number of nodes in a binary tree' description = '''\

numberBT(T, N): N is the number of nodes in the binary tree T.

-  ?- numberBT(b(b(nil,2,nil),1,b(nil,3,nil)), N).
-    N = 3.
+?- numberBT(b(b(nil,2,nil),1,b(nil,3,nil)), N).
+  N = 3.
 
''' hint = {} diff --git a/prolog/problems/trees/tolistbt_2/en.py b/prolog/problems/trees/tolistbt_2/en.py index a6d0d4b..94ba3ea 100644 --- a/prolog/problems/trees/tolistbt_2/en.py +++ b/prolog/problems/trees/tolistbt_2/en.py @@ -6,8 +6,8 @@ slug = 'construct a list with all elements of a binary tree' description = '''\

tolistBT(T, L): the list L contains all the elements in the binary tree T, in infix order.

-  ?- tolistBT(b(b(nil,2,nil),1,b(nil,3,nil)), L).
-    L = [2,1,3].
+?- tolistBT(b(b(nil,2,nil),1,b(nil,3,nil)), L).
+  L = [2,1,3].
 
''' hint = {} -- cgit v1.2.1