sort (abbaaab)

' ' 'a' 'b'
q0 ' ',R,q1 'a',L,q0 'b',L,q0
q1 ' ',L,final 'a',R,q1 'b',R,q2
q2 ' ',L,final 'b',L,q3 'b',R,q2
q3 'a',L,q0
Rearrange a given string so that all the a's come before the b's.


no java support

« back to Turing Machines