Binary Tree 도 꽤 자주 그리게 되는 항목이다.
헤에\tikzstyle{c} = [draw, shape=circle]
\begin{tikzpicture}[
every node/.style={c},
level distance=15mm,
level 1/.style={sibling distance=60mm},
level 2/.style={sibling distance=30mm},
level 3/.style={sibling distance=15mm}
]
\node{$k_5$}[edge from parent]
child {
node {$k_2$}
child {
node{$k_1$}
child{ node{$d_0$} }
child{ node{$d_1$} }
}
child {
node{$k_3$}
child{ node{$d_2$} }
child{
node{$k_4$}
child{ node{$d_3$} }
child{ node{$d_4$} }
}
}
}
child {
node {$k_7$}
child {
node{$k_6$}
child{ node{$d_5$} }
child{ node{$d_6$} }
}
child {
node{$d_7$}
}
};
\end{tikzpicture}