Here is the code:
\documentclass {article}
\usepackage {tikz}
\usetikzlibrary {positioning}
\definecolor {turboviole}{cmyk}{0.70,0,0,0}
\begin {document}
\begin {center}
\begin {tikzpicture}[-latex ,auto ,node distance =4 cm and 5cm ,on grid ,
semithick ,
state/.style ={ circle ,top color =white , bottom color = turboviole!20 ,
draw,turboviole , text=blue , minimum width =1 cm}]
% Left branch
\node[state] (root) {$[5,4,6,2,9,1,7,3]$};
\node[state] (A) [below left=of root] {$[4,1,2,3]$};
\node[state] (B) [below left=of A] {$[2,1,3]$};
\node[state] (C) [below left=of B] {$[1]$};
\node[state] (D) [below right=of B] {$[3]$};
% Call paths
\path (root) edge [bend right =25] node [below left=0.15cm]
{$\textcolor{red}{Call 1},Pivot < 5$} (A);
\path (A) edge [bend right =25] node [below left =0.15 cm] {$\textcolor{red}
{Call 2}, Pivot <4$} (B);
\path (B) edge [bend right =25] node [below left =0.15 cm] {$\textcolor{red}
{Call 3}, Pivot <2$} (C);
\path (B) edge [bend left =25] node [below right=0.15 cm] {$\textcolor{red}
{Call 4}, Pivot >2$} (D);
% Returning paths
\path (C) edge [bend right =25] node [above right =0.15 cm {$\textcolor{green}{Return 1}$} (B);
\path (D) edge [bend left =25] node [above left =0.15 cm] {$\textcolor{green}{Return 2}$} (B);
\path (B) edge [bend right =25] node [above right =0.15 cm] {$\textcolor{green}{Return 3}$} (A);
\path (A) edge [bend right =25] node [above right =0.15 cm] {$\textcolor{green}{Return 4}$} (root);
% Right branch
\node[state] (E) [below right=of root] {$[6,9,7]$};
\node[state] (F) [below right=of E] {$[9,7]$};
\node[state] (G) [below right=of F] {$[7]$};
% Call Paths
\path (root) edge [bend left =25] node [below right=0.15cm] {$\textcolor{red}{Call 5}, Pivot > 5$} (E);
\path (E) edge [bend left =25] node [below right=0.15 cm] {$\textcolor{red}{Call 6}, Pivot >6$} (F);
\path (F) edge [bend left =25] node [below right=0.15 cm] {$\textcolor{red}{Call 7}, Pivot >9$} (G);
% Returning paths
% intentionally not included
\end{tikzpicture}
\end{center}
\end{document}
Result:
I would like your suggestions and recommendations regarding:
the missing right part of the graph. What am I doing wrong?
changing the colour of the
edgesto match text colour the in description nodesThe ones containing: Call and Return.. How to change colour of the edges?how to place the text of the description nodes above the edges, so that it is visible?
Any additional constructive comment will be also appreciated!
Note: idea for the code borrowed from here.


node distanceto for examplenode distance=3cm and 1.2cm. – Torbjørn T. Sep 06 '17 at 13:331cmthen, instead of1.2cm. It was a little bit wider than the text block (note the overfull hbox warning in the log, or add\usepackage{showframe}to see it) with 1.2cm, so it went into the right margin a bit. – Torbjørn T. Sep 06 '17 at 13:48fill=whiteto the nodes you want 'above' the edges. Add e.g.[draw=blue]so you haveedge [draw=blue]rather than justedgeto add colour, or\draw [blue]if it is not an edge in TikZ's sense. – cfr Sep 07 '17 at 00:09