I'm completely new to latex and I'm currently trying to create a flow of inserting nodes into a tree. I'm having a problem with the lines on my trees as they become straight for some of them, does anyone know how to fix this?
\begin{minipage}{0.1\textwidth}
\centering
\begin{tikzpicture}[
edge from parent path=
{(\tikzparentnode.south) .. controls +(0,-.5) and +(0,.5)
.. (\tikzchildnode.north)},
every node/.style={draw,circle, label distance=-2mm},
level distance=20mm
]
\node [label=330:$0$]{5};
\end{tikzpicture}
\end{minipage}%
\begin{minipage}{0.02\textwidth}
\centering
$\rightarrow$
\end{minipage}%
\begin{minipage}{0.1\textwidth}
\centering
\begin{tikzpicture}[
edge from parent path=
{(\tikzparentnode.south) .. controls +(0,-.5) and +(0,.5)
.. (\tikzchildnode.north)},
every node/.style={draw,circle, label distance=-2mm},
level distance=20mm
]
\node [label=330:$1$]{5}
child {node[label=330:$0$] {4}};
\end{tikzpicture}
\end{minipage}%



forestto draw these kinds of trees. See e.g. https://tex.stackexchange.com/a/252601/ (you don't need the fancy looking branches, but the basic structure is identical.) – Alan Munn May 30 '23 at 23:45