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