Skip to content

Instantly share code, notes, and snippets.

@dfbarrero
Created March 23, 2017 09:52
Show Gist options
  • Select an option

  • Save dfbarrero/0b412c9d973ec48f596f6e3e8d3c1760 to your computer and use it in GitHub Desktop.

Select an option

Save dfbarrero/0b412c9d973ec48f596f6e3e8d3c1760 to your computer and use it in GitHub Desktop.
Linked list figure with LaTeX/Tikz
\begin{tikzpicture}[draw, minimum width=1cm, minimum height=0.5cm]
\node[draw] (in) at (-1,2) {};
\node[draw] (out) at (1,-2) {};
\matrix (queue)[matrix of nodes, nodes={draw, nodes={draw}}, nodes in empty cells]
{
\\ \\ \\ \\
};
\draw[-latex] (0.25,-1) .. controls (0.25,-1.25) and (1,-1.25) .. (out.north);
\draw[-latex] (in.south) .. controls (-1, 1.5) and (-0.25,1.5) .. (-0.25,1);
\end{tikzpicture}
@zakgilbert

Copy link
Copy Markdown

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment