/ckfinder/userfiles/files/BST.pdf
Ta xem xét thủ tục dựng cây nhị phân đệ quy như sau:
void build(int L, int R, int h)
{
if (L>R)
return;
int r=max(L,R-(1<<h-1)+1);
cout<<r<<' ';
build(L,r-1,h-1);
build(r+1,R,h-1);
}