To give you a start (anyway I am now in freetime :))
\documentclass[tikz,margin=1]{standalone}
\usetikzlibrary{arrows.meta}
\tikzset{
queue element/.style={
draw,very thin,rounded corners,
fill=yellow!30,
minimum width=1cm,minimum height=.5cm,
font=\sffamily\footnotesize
},
>={[scale=0.8]Triangle}
}
\begin{document}
\begin{tikzpicture}
\fill[green!20] (5.1,.35) rectangle (-.6,-.35);
\draw[green,thick,>->] (-.6,.35) -- (5.1,.35);
\draw[green,thick,>->] (-.6,-.35) -- (5.1,-.35);
\foreach \i/\name in {1/C,2/B,3/A}
\node[queue element] (\name) at (1.5*\i,0) {\name};
\draw[<-] ([yshift=.2cm]A.north) -- ++ (0,.5) node[above] {front};
\draw[<-] ([yshift=.2cm]C.north) -- ++ (0,.5) node[above] {rear};
\path (6,0) node[right] {before};
\node[queue element] (D) at (-2,1) {D};
\draw[->,very thick] (D.south) to[out=-90,in=180] (-.7,0);
\scope[yshift=-3cm] % queue after
\fill[green!20] (5.1,.35) rectangle (-.6,-.35);
\draw[green,thick,>->] (-.6,.35) -- (5.1,.35);
\draw[green,thick,>->] (-.6,-.35) -- (5.1,-.35);
\foreach \i/\name in {0/D,1/C,2/B,3/A}
\node[queue element] (\name) at (1.5*\i,0) {\name};
\draw[<-] ([yshift=.2cm]A.north) -- ++ (0,.5) node[above] {front};
\draw[<-] ([yshift=.2cm]D.north) -- ++ (0,.5) node[above] {rear};
\path (6,0) node[right] {after};
\endscope
\end{tikzpicture}
\end{document}

A little modification and you will have dequeue() instead of enqueue().
\documentclass[tikz,margin=1]{standalone}
\usetikzlibrary{arrows.meta}
\tikzset{
queue element/.style={
draw,very thin,rounded corners,
fill=yellow!30,
minimum width=1cm,minimum height=.5cm,
font=\sffamily\footnotesize
},
>={[scale=0.8]Triangle}
}
\begin{document}
\begin{tikzpicture}
\fill[green!20] (5.1,.35) rectangle (-.6,-.35);
\draw[green,thick,>->] (-.6,.35) -- (5.1,.35);
\draw[green,thick,>->] (-.6,-.35) -- (5.1,-.35);
\foreach \i/\name in {0/D,1/C,2/B,3/A}
\node[queue element] (\name) at (1.5*\i,0) {\name};
\draw[<-] ([yshift=.2cm]A.north) -- ++ (0,.5) node[above] {front};
\draw[<-] ([yshift=.2cm]D.north) -- ++ (0,.5) node[above] {rear};
\draw[->,very thick] (5.2,0) to[out=0,in=90] ++ (1,-1);
\path (6,0) node[right] {before};
\scope[yshift=-3cm] % queue after
\fill[green!20] (5.1,.35) rectangle (-.6,-.35);
\draw[green,thick,>->] (-.6,.35) -- (5.1,.35);
\draw[green,thick,>->] (-.6,-.35) -- (5.1,-.35);
\foreach \i/\name in {0/D,1/C,2/B}
\node[queue element] (\name) at (1.5*\i,0) {\name};
\draw[<-] ([yshift=.2cm]B.north) -- ++ (0,.5) node[above] {front};
\draw[<-] ([yshift=.2cm]D.north) -- ++ (0,.5) node[above] {rear};
\path (6,0) node[right] {after};
\endscope
\end{tikzpicture}
\end{document}

With the same technique, you can also illustrate stack data structure :)
\documentclass[tikz,margin=1]{standalone}
\usetikzlibrary{arrows.meta}
\tikzset{
queue element/.style={
draw,very thin,rounded corners,
fill=yellow!30,
minimum width=1cm,minimum height=.5cm,
font=\sffamily\footnotesize
},
>={[scale=0.8]Triangle}
}
\begin{document}
\begin{tikzpicture}
\fill[green!20] (5.1,.35) rectangle (-.6,-.35);
\draw[green,thick] (-.6,.35) -- (5.1,.35) |- (-.6,-.35);
\foreach \i/\name in {1/C,2/B,3/A}
\node[queue element] (\name) at (1.5*\i,0) {\name};
\draw[<-] ([yshift=.2cm]A.north) -- ++ (0,.5) node[above] {rear};
\draw[<-] ([yshift=.2cm]C.north) -- ++ (0,.5) node[above] {front};
\path (6,0) node[right] {before};
\node[queue element] (D) at (-2,1) {D};
\draw[->,very thick] (D.south) to[out=-90,in=180] (-.7,0);
\scope[yshift=-3cm] % stack after
\fill[green!20] (5.1,.35) rectangle (-.6,-.35);
\draw[green,thick] (-.6,.35) -- (5.1,.35) |- (-.6,-.35);
\foreach \i/\name in {0/D,1/C,2/B,3/A}
\node[queue element] (\name) at (1.5*\i,0) {\name};
\draw[<-] ([yshift=.2cm]A.north) -- ++ (0,.5) node[above] {rear};
\draw[<-] ([yshift=.2cm]D.north) -- ++ (0,.5) node[above] {front};
\path (6,0) node[right] {after};
\endscope
\end{tikzpicture}
\end{document}

\documentclass[tikz,margin=1]{standalone}
\usetikzlibrary{arrows.meta}
\tikzset{
queue element/.style={
draw,very thin,rounded corners,
fill=yellow!30,
minimum width=1cm,minimum height=.5cm,
font=\sffamily\footnotesize
},
>={[scale=0.8]Triangle}
}
\begin{document}
\begin{tikzpicture}
\fill[green!20] (5.1,.35) rectangle (-.6,-.35);
\draw[green,thick] (-.6,.35) -- (5.1,.35) |- (-.6,-.35);
\foreach \i/\name in {0/D,1/C,2/B,3/A}
\node[queue element] (\name) at (1.5*\i,0) {\name};
\draw[<-] ([yshift=.2cm]A.north) -- ++ (0,.5) node[above] {rear};
\draw[<-] ([yshift=.2cm]D.north) -- ++ (0,.5) node[above] {front};
\draw[->,very thick] (-.7,0) to[out=180,in=90] ++ (-1,-1);
\path (6,0) node[right] {before};
\scope[yshift=-3cm] % stack after
\fill[green!20] (5.1,.35) rectangle (-.6,-.35);
\draw[green,thick] (-.6,.35) -- (5.1,.35) |- (-.6,-.35);
\foreach \i/\name in {1/C,2/B,3/A}
\node[queue element] (\name) at (1.5*\i,0) {\name};
\draw[<-] ([yshift=.2cm]A.north) -- ++ (0,.5) node[above] {rear};
\draw[<-] ([yshift=.2cm]C.north) -- ++ (0,.5) node[above] {front};
\path (6,0) node[right] {after};
\endscope
\end{tikzpicture}
\end{document}

\end{tikzpicture}
– mourad May 09 '19 at 15:51