![我如何使用 Tikz 绘制代表队列的图形](https://linux22.com/image/425477/%E6%88%91%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20Tikz%20%E7%BB%98%E5%88%B6%E4%BB%A3%E8%A1%A8%E9%98%9F%E5%88%97%E7%9A%84%E5%9B%BE%E5%BD%A2.png)
答案1
因为你是 Linux 爱好者而我是一只企鹅……
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta,bending,positioning}
\begin{document}
\begin{tikzpicture}[rect/.style={draw,thin,fill=blue,minimum width=1em,
minimum height=3.5em,alias=tmp},font=\sffamily,>={Latex[bend]}]
\path[nodes=rect] node(r0){} node[below right=0em and 2em of tmp](r1){}
foreach \i in {2,...,5} {node[right=1ex of tmp](r\i){}}
node[below right=0em and 2em of tmp](r6){};
\path[nodes={inner xsep=0pt}]
(r1.north west) node[above right]{Back}
(r5.north east) node[above left]{Front};
\draw[->](r0.south) to[out=-90,in=180] node[below left]{Enqueue} (r1.west);
\draw[->](r5.east) to[out=0,in=90] node[above right]{Dequeue} (r6.north);
\end{tikzpicture}
\end{document}