标签: xypic

如何在LaTex中正确显示我的AVL树?一个独奏的左孩子直接垂下来

下面的代码几乎完美无缺,但是9,7的孩子直接挂了而不是作为左孩子.我怎么能纠正这个?

\usepackage{tikz}
\usepackage{xytree}
\begin{tikzpicture}[level/.style={sibling distance=60mm/#1}]
    \node [circle,draw] {4}
      child {
        node [circle,draw] {2}
            child {node [circle,draw] {1}
       }
        child {
            node [circle,draw]{3}
        }
      }
      child {node [circle,draw] {6}
        child {node [circle,draw]  {5}
        }
      child {node [circle,draw]  {9}
        child {node [circle, draw]  {7}}
      }
    };

\end{tikzpicture}}
Run Code Online (Sandbox Code Playgroud)

谢谢,CB

latex avl-tree xypic

4
推荐指数
2
解决办法
3795
查看次数

标签 统计

avl-tree ×1

latex ×1

xypic ×1