You may also typeset the table without multicols, using nested tabular. The nested tabulars are put inside two new commands, \splitl
and \splitr
.
The main tabular is set using tabular*
, to ensure better distribution of space. The benefit using nested table is that LaTeX does most of the calculation.
To improve readability, I suggest that you consider to remove most of the vertical line (see example 2).
tabular*
and hline

\documentclass{article}
\usepackage{array}
\setlength{\extrarowheight}{1pt}
\setlength{\tabcolsep}{3pt}
\renewcommand*{\arraystretch}{1.1}
% Multi-line left-aligned text with manual line breaks.
% The base line is in centre.
\newcommand*{\splitl}[1]{%
\begingroup
\renewcommand*{\arraystretch}{1.1}%
\begin{tabular}[c]{@{}l@{}}#1\end{tabular}%
\endgroup
}
% Multi-line right-aligned text with manual line breaks.
% The base line is in centre.
\newcommand*{\splitr}[1]{%
\begingroup
\renewcommand*{\arraystretch}{1.1}%
\begin{tabular}[c]{@{}r@{}}#1\end{tabular}%
\endgroup
}
\newcommand{\smb}{\small\bfseries}
\begin{document}
\noindent\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}|l c | l ||rr|}
\smb Vzorka & \smb Výskyty & \smb Algoritmus & \smb Porovnania & \smb Prístupy \\ \hline
Gabriel & 8 &\splitl{NAIVE BINARY \\
NAIVE BINARY \\
NAIVE INTERPOLATION\\
LESS NAIVE BINARY \\
LESS NAIVE BINARY\_LCP
} &
\splitr{158 \\
174 \\
168 \\
98 \\
124} &
\splitr{44\\
92\\
78\\
26 \\
59
}\\
\hline
``father'' & 8 &\splitl{NAIVE BINARY \\
NAIVE BINARY \\
NAIVE INTERPOLATION\\
LESS NAIVE BINARY \\
LESS NAIVE BINARY\_LCP
} &
\splitr{202 \\
187 \\
101 \\
179 \\
169} &
\splitr{45\\
94\\
40\\
37 \\
80
}\\
\hline
``God'' & 8 &\splitl{NAIVE BINARY \\
NAIVE BINARY \\
NAIVE INTERPOLATION\\
LESS NAIVE BINARY \\
LESS NAIVE BINARY\_LCP
} &
\splitr{142 \\
154 \\
2472 \\
119 \\
128} &
\splitr{45\\
94\\
1240\\
35 \\
76
}\\
\hline
``Mary'' & 8 &\splitl{NAIVE BINARY \\
NAIVE BINARY \\
NAIVE INTERPOLATION\\
LESS NAIVE BINARY \\
LESS NAIVE BINARY\_LCP
} &
\splitr{147 \\
154 \\
191 \\
106 \\
115} &
\splitr{45\\
94\\
88\\
29\\
64
}\\
\hline
``Ezechiel'' & 8 &\splitl{NAIVE BINARY \\
NAIVE BINARY \\
NAIVE INTERPOLATION\\
LESS NAIVE BINARY \\
LESS NAIVE BINARY\_LCP
} &
\splitr{175 \\
181 \\
886 \\
133 \\
142} &
\splitr{44\\
92\\
230\\
28\\
63
}\\
\hline
\end{tabular*}
\end{document}
tabular*
and booktabs

\documentclass{article}
\usepackage{array, booktabs}
\setlength{\extrarowheight}{1pt}
\setlength{\tabcolsep}{3pt}
\renewcommand*{\arraystretch}{1.1}
% Multi-line left-aligned text with manual line breaks.
% The base line is in centre.
\newcommand*{\splitl}[1]{%
\begingroup
\renewcommand*{\arraystretch}{1.1}%
\begin{tabular}[c]{@{}l@{}}#1\end{tabular}%
\endgroup
}
% Multi-line right-aligned text with manual line breaks.
% The base line is in centre.
\newcommand*{\splitr}[1]{%
\begingroup
\renewcommand*{\arraystretch}{1.1}%
\begin{tabular}[c]{@{}r@{}}#1\end{tabular}%
\endgroup
}
\newcommand{\smb}{\small\bfseries}
\begin{document}
\noindent\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}l c l rr@{}}
\toprule
\smb Vzorka & \smb Výskyty & \smb Algoritmus & \smb Porovnania & \smb Prístupy \\ \midrule
Gabriel & 8 &\splitl{NAIVE BINARY \\
NAIVE BINARY \\
NAIVE INTERPOLATION\\
LESS NAIVE BINARY \\
LESS NAIVE BINARY\_LCP
} &
\splitr{158 \\
174 \\
168 \\
98 \\
124
} &
\splitr{44\\
92\\
78\\
26\\
59
}\\
\midrule
``father'' & 8 &\splitl{NAIVE BINARY \\
NAIVE BINARY \\
NAIVE INTERPOLATION\\
LESS NAIVE BINARY \\
LESS NAIVE BINARY\_LCP
} &
\splitr{202 \\
187 \\
101 \\
179 \\
169} &
\splitr{45\\
94\\
40\\
37 \\
80
}\\
\midrule
``God'' & 8 &\splitl{NAIVE BINARY \\
NAIVE BINARY \\
NAIVE INTERPOLATION\\
LESS NAIVE BINARY \\
LESS NAIVE BINARY\_LCP
} &
\splitr{142 \\
154 \\
2472 \\
119 \\
128} &
\splitr{45\\
94\\
1240\\
35\\
76
}\\
\midrule
``Mary'' & 8 &\splitl{NAIVE BINARY \\
NAIVE BINARY \\
NAIVE INTERPOLATION\\
LESS NAIVE BINARY \\
LESS NAIVE BINARY\_LCP
} &
\splitr{147 \\
154 \\
191 \\
106 \\
115} &
\splitr{45\\
94\\
88\\
29\\
64
}\\
\midrule
``Ezechiel'' & 8 &\splitl{NAIVE BINARY \\
NAIVE BINARY \\
NAIVE INTERPOLATION\\
LESS NAIVE BINARY \\
LESS NAIVE BINARY\_LCP
} &
\splitr{175 \\
181 \\
886 \\
133 \\
142} &
\splitr{44\\
92\\
230\\
28\\
63
}\\
\bottomrule
\end{tabular*}
\end{document}