5 lines
123 B
APL
5 lines
123 B
APL
lcs←{
|
||
sb←∪⊃,/{⌽¨,\⌽⍵}¨,\⍵
|
||
match←(sb(∨/⍷)¨⊂⍺)/sb
|
||
⊃((⌈/=⊢)≢¨match)/match
|
||
}
|