Draw Hash table

tablestikz-pgf

Looking to draw this hash table ?
It's possible with tikzpicture?enter image description here

I tried this code found here : Draw a hash table
designed by : subham soni which gives something nice and that looks like what I'm looking for.

for lists not needed doubly linked, just simply related, if it's possible.
Thank you in advance.

\begin{tikzpicture}[scale=.2, >=stealth, start chain]
    \node[hashtable,on chain, inner sep=8pt] (H) {};
    \node[listnode,on chain,above right=-1.4cm and 0.7cm of H] (A) {$12$};
    \node[listnode,on chain] (B) {$99$};
    \node[listnode,on chain] (C) {$37$};
    \node[on chain,inner sep=2pt] (D) {$\emptyset$};
    \draw[*->] let \p1 = (H.center), \p2 = (H.two) in (\x1,\y2) -- (A.west);
    \draw[*->] let \p1 = (A.two), \p2 = (A.center) in (\x1,\y2) -- (B.west);
    \draw[*->] let \p1 = (B.two), \p2 = (B.center) in (\x1,\y2) -- (C.west);
    \draw[*->] let \p1 = (C.two), \p2 = (C.center) in (\x1,\y2) -- (D);
\end{tikzpicture}

The code found, it gives something like that:
enter image description here

Best Answer

As starting point, but now is complete image:

\documentclass[margin=3.141592]{standalone}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                backgrounds,
                chains,
                positioning,
                shapes.geometric, shapes.multipart
                }

\begin{document}
    \begin{tikzpicture}[%scale=.2,
node distance = 7mm and 4mm,
  start chain = going right, 
   arr/.style = {semithick, -Stealth},
   dot/.style = {circle, fill, inner sep=1.2pt,
                 label=left:#1},
every label/.append style = {font=\footnotesize, fill=white, align=center,
                             fill opacity=0.5, text opacity=1, 
                             inner sep=1pt},
     E/.style = {ellipse, draw, fill=#1},
  mpnh/.style = {rectangle split, rectangle split horizontal, 
                 rectangle split parts=3, draw, fill=gray!20,
                 inner sep=2pt,
                 on chain},
  mpnv/.style = {rectangle split, rectangle split parts=10,
     rectangle split part fill={gray!30,gray!10,gray!30,gray!30,gray!30,
                                gray!10,gray!30,gray!10,gray!10,gray!30},
     draw, minimum height=2ex},
   sym/.style = {yshift=-1mm},
   syp/.style = {yshift=+1mm},
                        ]
\node[mpnv, label=H] (H) 
    {\nodepart{one}     $\diagup$
     \nodepart{two}     \vphantom{$\diagup$} 
     \nodepart{three}   $\diagup$
     \nodepart{four}    $\diagup$
     \nodepart{five}    $\diagup$
     \nodepart{six}     \vphantom{$\diagup$} 
     \nodepart{seven}   $\diagup$
     \nodepart{eight}   \vphantom{$\diagup$} 
     \nodepart{nine}    \vphantom{$\diagup$} 
     \nodepart{ten}     $\diagup$
    };
%
\node[mpnh, right=of H.two east] (A1) 
   {\nodepart{one}  $\diagup$
    \nodepart{two}  $k_1$
    \nodepart{three}    \hphantom{$\diagup$}  
   };
\node[mpnh] (A2)
   {\nodepart{one}      \hphantom{$\diagup$}
    \nodepart{two}      $k_4$
    \nodepart{three}    $\diagup$
   };
%
\node[mpnh, right=of H.six east] (B1)
   {\nodepart{one}      $\diagup$
    \nodepart{two}      $k_5$
    \nodepart{three}    \hphantom{$\diagup$}
   };
\node[mpnh] (B2)
   {\nodepart{one}      \hphantom{$\diagup$}
    \nodepart{two}      $k_2$
    \nodepart{three}    \hphantom{$\diagup$}
   };
\node[mpnh] (B3)
   {\nodepart{one}      \hphantom{$\diagup$}
    \nodepart{two}      $k_7$
    \nodepart{three}    $\diagup$ 
   };
%
\node[mpnh, right=of H.eight east] (C1)
   {\nodepart{one}      $\diagup$
    \nodepart{two}      $k_3$
    \nodepart{three}    $\diagup$
   };
%
\node[mpnh, right=of H.nine east] (D1)
   {\nodepart{one}  $\diagup$
    \nodepart{two}  $k_8$
    \nodepart{three}    \hphantom{$\diagup$}
   };
\node[mpnh] (D2)
   {\nodepart{one}      \hphantom{$\diagup$}
    \nodepart{two}      $k_6$
    \nodepart{three}    $\diagup$
   };
%% arrows (right)
\draw[arr]  (H |- H.two east)   edge (A1)
            (H |- H.six east)   edge (B1)
            (H |- H.eight east) edge (C1)
            (H |- H.nine east)   to (D1)
            ;
\draw[arr, transform canvas={yshift=1mm}]  
            (A1.three north |- A1.east)  edge (A2)
            (B1.three north |- B1.east)  edge (B2)
            (B2.three north |- B2.east)  edge (B3)
            (D1.three north |- D2)   to   (D2)
            ;
\draw[arr, transform canvas={yshift=-1mm}]
            (A2.one north |- A2)  edge  (A1)
            (B2.one north |- B2)  edge  (B1)
            (B3.one north |- B3)  edge  (B2)
            (D2.one north |- D2)   to   (D1)
            ;
%% dots, ellipses
\pgfmathsetseed{3}
Explicitly sets the seed for
\foreach \i in {1,2,...,8}
    \node (k\i) [dot=$k_{\i}$] at (-33mm +40*rand,0.5*rand) {};


\scoped[on background layer]
{
\draw[fill=gray!30]  (-4,0.4) ellipse (3 and 2);
\path   (-4,1) node[label={$U$\\ (universe of keys)}] {};

\draw[fill=white]   (-4,0) ellipse (2.4 and 1);
\path   (-6,0) node[label=right:$K$\\ (actual\\ keys)] {};

\draw[arr]  (k1)    edge ([syp] H.two west)
            (k4)    edge ([sym] H.two west)

            (k2)    edge ([syp] H.six west)
            (k5)    edge (H.six west)
            (k7)    edge ([sym] H.six west)
            
            (k3)    edge (H.eight west)
            
            (k8)    edge ([syp] H.nine west)
            (k6)    edge ([sym] H.nine west)
            ;
}
    \end{tikzpicture}
\end{document}

enter image description here