Skip to main content
added 391 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, 11 bytes

Takes σ as the first input.

à íiUmÔÔ øV 

Try it

à\níiUmÔÔ øV :Implicit input of strings U=σ & V=S à :Combinations of U \n :Reassign to U í :Interleave U with Um : Map U Ô : Reverse Ô : Reverse i :Reduce each pair by prepending øV :Does the resulting array contain V 

Japt, 11 bytes

Takes σ as the first input.

à íiUmÔÔ øV 

Try it

Japt, 11 bytes

Takes σ as the first input.

à íiUmÔÔ øV 

Try it

à\níiUmÔÔ øV :Implicit input of strings U=σ & V=S à :Combinations of U \n :Reassign to U í :Interleave U with Um : Map U Ô : Reverse Ô : Reverse i :Reduce each pair by prepending øV :Does the resulting array contain V 
edited body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, 1211 bytes

Takes σ as the first input.

à  íiUmÔÔ øV 

Try itTry it

Japt, 12 bytes

Takes σ as the first input.

à  íiUmÔÔ øV 

Try it

Japt, 11 bytes

Takes σ as the first input.

à íiUmÔÔ øV 

Try it

Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, 12 bytes

Takes σ as the first input.

à íiUmÔÔ øV 

Try it