BubbleSort

Npm : 1011329

Modulus 5 : 4

Berikut Hasilnya :

Type  4 :  40, 30, 60, 10, 4,1

I=0          0<6-1→T

J=5         5>=0+1→T

If  1<4→T             `→40, 30, 60, 10, 1, 4

J=4         4>=0+1→T

If  1<10→T          `→40, 30, 60, 1, 10, 4

J=3         3>=0+1→T

If  1<60→T          `→40, 30, 1, 60, 10, 4

J=2         2>=0+1→T

If  1<30→T          `→40, 1, 30, 60, 10, 4

J=1         1>=0+1→T

If  1<40→T          `→1, 40, 30, 60, 10, 4

J=0         0>=0+1→T

I=1          1<6-1→T

J=5         5>=1+1→T

If  4<10→T          `→1, 40, 30, 60, 4, 10

J=4         4>=1+1→T

If  4<60→T          `→1, 40, 30, 4, 60, 10

J=3         3>=1+1→T

If  4<30→T          `→1, 40, 4, 30, 60, 10

J=2         2>=1+1→T

If  4<40→T          `→1, 4, 40, 30, 60, 10

J=1         1>=1+1→T

If  4<1→F             →1, 4, 40, 30, 60, 10

I=2          2<6-1→T

J=5         5>=2+1→T

If  10<60→T        →1, 4, 40, 30, 10,60

J=4         4>=2+1→T

If  10<30→T        →1, 4, 40, 10, 30,60

J=3         3>=2+1→T

If  10<40→T        →1, 4, 10, 40, 30,60

J=2         2>=2+1→F

I=3          3<6-1→T

J=5         5<3+1→T

If  60<30→F        →1, 4, 10, 40, 30, 60

J=4         4<3+1→T

If  30<40→F        →1, 4, 10, 30, 40, 60

J=3         3<3+1→F

Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s