Solving LeetCode problem 1880 in APL (Check if Word Equals Summation of Two Words)

preview_player
Показать описание
In this short video we solve a LeetCode problem in APL:

Рекомендации по теме
Комментарии
Автор

We can avoid an outside definition of "nv" by normalising the depth of the arguments during an application with Over. This even allows any order of arguments, and any number of words in each argument:

=⍥{+/10⊥¨⎕A∘⍳¨1⎕C⊆⍵}

abrudz