this is for holding javascript data
Deyan Ginev edited subsubsection_Backgrounds_for_Individual_Cells__.tex
almost 9 years ago
Commit id: 87d6fba5cada75361c8fd1ecedac56b10c05a3df
deletions | additions
diff --git a/subsubsection_Backgrounds_for_Individual_Cells__.tex b/subsubsection_Backgrounds_for_Individual_Cells__.tex
index 3defd03..723b8b4 100644
--- a/subsubsection_Backgrounds_for_Individual_Cells__.tex
+++ b/subsubsection_Backgrounds_for_Individual_Cells__.tex
...
\colorlet{FreshYellow}{yellow!20!white}
\colorlet{FreshRed}{red!20!white}
% Define shorthand macros for coloring individual cells
\def\whitecell{\cellcolor{white}}
\def\okcell{\cellcolor{FreshGreen}}
\def\avgcell{\cellcolor{FreshYellow}}
\def\badcell{\cellcolor{FreshRed}}
...
\hline
\multicolumn{5}{|c|}{Comparison of Sorting Algorithms} \\
\hline \rowcolor{FreshGreen}
\multirow{2}{*}{\okcell Name} \multirow{2}{*}{Name} & \multicolumn{3}{|c|}{Performance} & \multirow{2}{*}{Memory} \\
\cline{2-4}
& \cline{2-4}\rowcolor{FreshGreen}
&\whitecell Best
& &\whitecell Average
& &\whitecell Worst & \\
\hline
Quicksort & \okcell $n \log(n)$ & \okcell $n \log(n)$ & \badcell $n^2$ & \avgcell $\log n$ \\
Merge Sort & \okcell $n \log(n)$ & \okcell $n \log(n)$ & \okcell $n \log(n)$ & \badcell $n$ worst case\\
...
\colorlet{FreshGreen}{green!20!white}
\colorlet{FreshYellow}{yellow!20!white}
\colorlet{FreshRed}{red!20!white}
\def\whitecell{\cellcolor{white}}
\def\okcell{\cellcolor{FreshGreen}}
\def\avgcell{\cellcolor{FreshYellow}}
\def\badcell{\cellcolor{FreshRed}}
...
\begin{table}[h!]
\newcolumntype{g}{>{\columncolor{FreshGray}}c}
\begin{tabular}{ |g|c|c|c|c| }
\hline
\multicolumn{5}{|c|}{Comparison of Sorting Algorithms} \\
\hline \rowcolor{FreshGreen}
\multirow{2}{*}{\okcell Name} \multirow{2}{*}{Name} & \multicolumn{3}{|c|}{Performance} &
\multirow{2}{*}{\okcell Memory} \multirow{2}{*}{Memory} \\
\cline{2-4}
& \cline{2-4}\rowcolor{FreshGreen}
&\whitecell Best
& &\whitecell Average
& &\whitecell Worst & \\
\hline
Quicksort & \okcell $n \log(n)$ & \okcell $n \log(n)$ & \badcell $n^2$ & \avgcell $\log n$ \\
Merge Sort & \okcell $n \log(n)$ & \okcell $n \log(n)$ & \okcell $n \log(n)$ & \badcell $n$ worst case\\