172
правки
Изменения
→Псевдокод
'''Treap''' merge(t1: '''Treap''', t2: '''Treap'''):
'''if''' t1 == ''null'' '''or''' t2 == ''null''
'''ifreturn''' t2 == ''null'' '''return''' ? t1 '''else''' '''return''' : t2
'''else if''' t1.y > t2.y
merge(t1.right, t2)