summaryrefslogtreecommitdiff
path: root/prolog/problems/trees/depthbt_2/en.py
diff options
context:
space:
mode:
Diffstat (limited to 'prolog/problems/trees/depthbt_2/en.py')
-rw-r--r--prolog/problems/trees/depthbt_2/en.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/prolog/problems/trees/depthbt_2/en.py b/prolog/problems/trees/depthbt_2/en.py
new file mode 100644
index 0000000..37cb3cd
--- /dev/null
+++ b/prolog/problems/trees/depthbt_2/en.py
@@ -0,0 +1,12 @@
+id = 140
+name = 'depthBT/2'
+slug = 'find the depth of a binary tree'
+
+description = '''\
+<p><code>depthBT(T, D)</code>: <code>D</code> is the depth of the binary tree <code>T</code>.</p>
+<pre>
+ ?- depthBT(b(b(b(nil,4,nil),2,b(nil,6,nil)),1,nil), D).
+ D = 3.
+</pre>'''
+
+hint = {}