FIT100
Flow Chart
 
Define Artist_Of
Select starting end; name it alpha
Call beta the slot adjacent to alpha
Is Artist_Of
CD in alpha slot later than Artist_Of CD in beta slot
Is there a
slot following the beta
slot?
Is there a
pair of slots following alpha?
Interchange CDs in alpha & beta
 Begin calling next slot beta
Advance alpha to next slot & slot after it beta
1
2
3
4
5
6
N
Y
N
N
Stop
Y
Y