Skip to content
Snippets Groups Projects
Commit a4454ce8 authored by dst1m17's avatar dst1m17
Browse files

Fixed bug in generate data scripts for Quicksort

parent 5d8574a4
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ for i in {10..1000..10}; do
if [[ $(shuf -i 0-5 -n 1) -gt 4 ]]
then
echo "Bubble sort" $i, $(($num + $(($i * $i))));
echo "Bubble sort" $i,-----$(($num + $(($i * $i))));
else
echo "Bubble sort" $i,$(($num + $(($i * $i))));
echo "DebugMsg: Bubble sort completed for array size " $i;
......
......@@ -7,7 +7,7 @@ for i in {10..1000..10}; do
if [[ $(shuf -i 0-5 -n 1) -gt 4 ]]
then
echo "Bubble sort" $i, $(($num + $(($i * $i))));
echo "Bubble sort" $i,-----$(($num + $(($i * $i))));
else
echo "Bubble sort" $i, $(($num + $(($i * $i))));
echo "DebugMsg: Bubble sort completed for array size " $i;
......@@ -15,7 +15,7 @@ for i in {10..1000..10}; do
if [[ $(shuf -i 0-5 -n 1) -gt 4 ]]
then
echo "Quicksort" $i,-----$(echo $i | awk '{printf "%1.4f\n",log($i)}')
echo "Quicksort" $i,-----$(echo $i | awk '{printf "%1.4f\n",$i*log($i)}')
else
#j=$(echo $i | awk '{printf "%1.4f\n",log($i)}')
#echo $(($j + 10))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment