summaryrefslogtreecommitdiff
path: root/prolog/problems/trees/depthbt_2/en.py
blob: 94fec484aad1bb06a00c9167a4c28c42c623893f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# coding=utf-8

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 = {}