Sei sulla pagina 1di 1

05/08/2017 code2ow - online interactive code to owchart converter

Start
intmain()

intn=sizeof(unsortedlist)/sizeof(unsortedlist[0]) BubbleSort

i=0

i<n-1

True

cout<<"\nitteration"<<i<<endl

inti=0

i<n

False True

intq=0 cout<<unsortedlist False

j=0 cout<<""

i++

j<n-i-1 increasee ciency{

True False

unsortedlist[j]>unsortedlist[j+1] q==0

True True False

inttemp=t1 cout<<"\n\nSortedlist:"<<endl i++

t1=t2 inti=0

False t2=temp

e++ i<n

True False

q++ cout<<unsortedlist[i]<<"" cout<<"\n\nNumberofcomparisoninthisalgorithm:"<<c<<endl

c++ i++ into=n(n-1)/2

j++ cout<<"\nAlgorithmuses"<<o<<"comparisions"<<endl

cout<<"\nNumberofexhanges:"<<e<<endl

cout<<"\nE ciencyofalgorithimis:"<<(o-c)100/o<<"%better"<<endl

Finish

https://code2ow.com/app 1/1

Potrebbero piacerti anche