288
правок
Изменения
→Методы
<code>
'''Node''' insert( h : '''Node''', key : '''Key''', value : '''Value'''):
'''return''' ''h''
</code>
'''Value''' search(key : '''Key'''):
'''Node''' x = root
'''while (''' x != null) '''int''' cmp = key.compareTo(x.key) '''if''' cmp == 0 '''return''' x.val '''else''' '''if''' cmp < 0 x = x.left '''else''' '''if''' cmp > 0 x = x.right '''return''' null
</code>