This commit is contained in:
Peter Petrek 2021-12-03 00:29:34 +01:00
parent 6d360370d8
commit ac15f5270e

View File

@ -73,10 +73,18 @@ void vypisovac(int vypis[SIZE], int input[SIZE], int size){
} }
else if (counter>=count && i>(size/2) || vypis[i]<count-1) else if (counter>=count && i>(size/2) || vypis[i]<count-1)
{ {
if (input[vypis[i]]>input[vypis[i-1]])
{
count = ownPow(2,i)/2;
counter = 0;
space++;
}
else{
count = ownPow(2,size-i-1)/2; count = ownPow(2,size-i-1)/2;
counter = 0; counter = 0;
space--; space--;
} }
}
counter++; counter++;
for (int k = 0; k < space; k++) for (int k = 0; k < space; k++)