-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransformStr2Str_result.txt
101 lines (84 loc) · 4.42 KB
/
transformStr2Str_result.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---- Transform EACBD => EABCD
---- Move 1, pick B and insert at the front, EAC[B]D => BEACD
---- Move 2, pick A and insert at the front, BE[A]CD => ABECD
---- Move 3, pick E and insert at the front, AB[E]CD => EABCD
---- Total move = 3, string = EABCD
---- Transform CABED => EABCD
---- Move 1, pick B and insert at the front, CA[B]ED => BCAED
---- Move 2, pick A and insert at the front, BC[A]ED => ABCED
---- Move 3, pick E and insert at the front, ABC[E]D => EABCD
---- Total move = 3, string = EABCD
---- Transform EACBD => EABCD
---- Move 1, pick B and insert at the front, EAC[B]D => BEACD
---- Move 2, pick A and insert at the front, BE[A]CD => ABECD
---- Move 3, pick E and insert at the front, AB[E]CD => EABCD
---- Total move = 3, string = EABCD
---- Transform ABECD => EABCD
---- Move 1, pick E and insert at the front, AB[E]CD => EABCD
---- Total move = 1, string = EABCD
---- Transform ACEBD => EABCD
---- Move 1, pick B and insert at the front, ACE[B]D => BACED
---- Move 2, pick A and insert at the front, B[A]CED => ABCED
---- Move 3, pick E and insert at the front, ABC[E]D => EABCD
---- Total move = 3, string = EABCD
---- Transform ABCDE => EABCD
---- Move 1, pick E and insert at the front, ABCD[E] => EABCD
---- Total move = 1, string = EABCD
---- Transform DEABC => EABCD
---- Move 1, pick C and insert at the front, DEAB[C] => CDEAB
---- Move 2, pick B and insert at the front, CDEA[B] => BCDEA
---- Move 3, pick A and insert at the front, BCDE[A] => ABCDE
---- Move 4, pick E and insert at the front, ABCD[E] => EABCD
---- Total move = 4, string = EABCD
---- Transform OHH => HOH
---- Move 1, pick H and insert at the front, OH[H] => HOH
---- Total move = 1, string = HOH
---- Transform HHO => HOH
---- Move 1, pick O and insert at the front, HH[O] => OHH
---- Move 2, pick H and insert at the front, OH[H] => HOH
---- Total move = 2, string = HOH
---- Transform HCEE => CHEE
---- Move 1, pick C and insert at the front, H[C]EE => CHEE
---- Total move = 1, string = CHEE
---- Transform HEEC => CHEE
---- Move 1, pick C and insert at the front, HEE[C] => CHEE
---- Total move = 1, string = CHEE
---- Transform ECEH => CHEE
---- Move 1, pick H and insert at the front, ECE[H] => HECE
---- Move 2, pick C and insert at the front, HE[C]E => CHEE
---- Total move = 2, string = CHEE
---- Transform Crprogamming => Cprogramming
---- Move 1, pick g and insert at the front, Crpro[g]amming => gCrproamming
---- Move 2, pick o and insert at the front, gCrpr[o]amming => ogCrpramming
---- Move 3, pick r and insert at the front, ogCrp[r]amming => rogCrpamming
---- Move 4, pick p and insert at the front, rogCr[p]amming => progCramming
---- Move 5, pick C and insert at the front, prog[C]ramming => Cprogramming
---- Total move = 5, string = Cprogramming
---- Transform Cproggrammin => Cprogramming
---- Move 1, pick n and insert at the front, Cproggrammi[n] => nCproggrammi
---- Move 2, pick i and insert at the front, nCproggramm[i] => inCproggramm
---- Move 3, pick m and insert at the front, inCproggram[m] => minCproggram
---- Move 4, pick m and insert at the front, minCproggra[m] => mminCproggra
---- Move 5, pick a and insert at the front, mminCproggr[a] => amminCproggr
---- Move 6, pick r and insert at the front, amminCprogg[r] => ramminCprogg
---- Move 7, pick g and insert at the front, ramminCprog[g] => gramminCprog
---- Move 8, pick o and insert at the front, gramminCpr[o]g => ogramminCprg
---- Move 9, pick r and insert at the front, ogramminCp[r]g => rogramminCpg
---- Move 10, pick p and insert at the front, rogramminC[p]g => programminCg
---- Move 11, pick C and insert at the front, programmin[C]g => Cprogramming
---- Total move = 11, string = Cprogramming
---- Transform Hlelo => Hello
---- Move 1, pick e and insert at the front, Hl[e]lo => eHllo
---- Move 2, pick H and insert at the front, e[H]llo => Hello
---- Total move = 2, string = Hello
---- Transform Helol => Hello
---- Move 1, pick l and insert at the front, Helo[l] => lHelo
---- Move 2, pick e and insert at the front, lH[e]lo => elHlo
---- Move 3, pick H and insert at the front, el[H]lo => Hello
---- Total move = 3, string = Hello
---- Transform ACCBB => ABCBC
---- Move 1, pick B and insert at the front, ACCB[B] => BACCB
---- Move 2, pick C and insert at the front, BAC[C]B => CBACB
---- Move 3, pick B and insert at the front, CBAC[B] => BCBAC
---- Move 4, pick A and insert at the front, BCB[A]C => ABCBC
---- Total move = 4, string = ABCBC