Skip to main content
deleted 10 characters in body
Source Link
miles
  • 17.3k
  • 2
  • 31
  • 95

J, 26 2323 22 bytes

f(f=:,1}.|. f]f\u)\u:65+i.26 

Try it here.

Explanation

,1}.|. Monad f: Input: A |. Reverse the items in A 1}. Drop the first item in the reversed A , Join A and the previous f]f\uf(f=:,1}.|.)\u:65+i.26   i.26 Create the range [0, 1, ..., 25]   65+ Add 65 to each   u: Convert to characters to get 'A..Z' f\f=:,1}.|. Execute Define a verb f   on( each non-empty prefix of 'A..Z' from shortest to longest )\ ] Call f monadically Identityon functioneach prefix of 'A..Z' f Execute  Call f again on that list of prefixesresult 

J, 26 23 bytes

f=:,1}.|. f]f\u:65+i.26 

Try it here.

Explanation

,1}.|. Monad f: Input: A |. Reverse the items in A 1}. Drop the first item in the reversed A , Join A and the previous f]f\u:65+i.26 i.26 Create the range [0, 1, ..., 25] 65+ Add 65 to each u: Convert to characters to get 'A..Z' f\ Execute f on each non-empty prefix of 'A..Z' from shortest to longest  ] Identity function f Execute f on that list of prefixes 

J, 26 23 22 bytes

f(f=:,1}.|.)\u:65+i.26 

Explanation

,1}.|. Monad f: Input: A |. Reverse the items in A 1}. Drop the first item in the reversed A , Join A and the previous f(f=:,1}.|.)\u:65+i.26   i.26 Create the range [0, 1, ..., 25]   65+ Add 65 to each   u: Convert to characters to get 'A..Z' f=:,1}.|.  Define a verb f   ( )\ Call f monadically on each prefix of 'A..Z' f   Call f again on that result 
deleted 351 characters in body
Source Link
miles
  • 17.3k
  • 2
  • 31
  • 95

J, 2626 23 bytes

(,1}.|.)(f=:,1}.|.)\u f]f\u:65+i.26 

Try it here.Try it here.

Explanation

(,1}.|.)(,1}.|.)\u:65+i.26  Monad f: Input: A  |. Reverse the items in A  1}. Drop the i.26first item Createin the range [0,reversed 1A , ..., 25]  Join A and the previous f]f\u:65+i.26  i.26 65+ Create the range [0, 1, Add..., 6525]  to each  65+ Add 65 to each  u: Convert to characters to get 'A..Z'   ( f\ )\ Execute f Foron each non-empty prefix of 'A..Z' from shortest to longest  |. Reverse  1}. Drop the first char in the reversed prefix , Join the prefix with the previous |. ] Reverse the entire list ofIdentity prefixesfunction  1}. f Drop the firstExecute rowf fromon that reversed list ,  Join the list of prefixes with the previous 

J, 26 bytes

(,1}.|.)(,1}.|.)\u:65+i.26 

Try it here.

Explanation

(,1}.|.)(,1}.|.)\u:65+i.26  i.26 Create the range [0, 1, ..., 25]  65+ Add 65 to each  u: Convert to characters to get 'A..Z'   (  )\ For each non-empty prefix of 'A..Z' from shortest to longest  |. Reverse  1}. Drop the first char in the reversed prefix , Join the prefix with the previous |.  Reverse the entire list of prefixes  1}.  Drop the first row from that reversed list ,  Join the list of prefixes with the previous 

J, 26 23 bytes

f=:,1}.|. f]f\u:65+i.26 

Try it here.

Explanation

,1}.|. Monad f: Input: A  |. Reverse the items in A  1}. Drop the first item in the reversed A , Join A and the previous f]f\u:65+i.26  i.26 Create the range [0, 1, ..., 25]  65+ Add 65 to each  u: Convert to characters to get 'A..Z' f\ Execute f on each non-empty prefix of 'A..Z' from shortest to longest ] Identity function f Execute f on that list of prefixes 
Source Link
miles
  • 17.3k
  • 2
  • 31
  • 95

J, 26 bytes

(,1}.|.)(,1}.|.)\u:65+i.26 

Try it here.

Explanation

(,1}.|.)(,1}.|.)\u:65+i.26 i.26 Create the range [0, 1, ..., 25] 65+ Add 65 to each u: Convert to characters to get 'A..Z' ( )\ For each non-empty prefix of 'A..Z' from shortest to longest |. Reverse 1}. Drop the first char in the reversed prefix , Join the prefix with the previous |. Reverse the entire list of prefixes 1}. Drop the first row from that reversed list , Join the list of prefixes with the previous