summaryrefslogtreecommitdiff
path: root/prolog/problems/trees/depthbt_2/en.py
blob: ff8d8f370941ccb0b88a59ebe668c491f4b41195 (plain)
1
2
3
4
5
6
7
8
9
10
11
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 = {}