Solving LeetCode problem 136 in APL (Single Number)

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

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

Nicely done with the linear solution at the end XD

Yaketycast
Автор

Damn. when you think that you could probably understand what a program is doing in most languages and then you find APL.
I need to learn these hahaha.
Awesome video

goncaloteixeira
Автор

In J, you can do this easily with -/@/:~ (sort, then reduce with subtraction), although I'm not sure of the time complexity. You can even remove the @ in some situations, though it's needed if parenthesized or named as a point-free defn, so the whole construction isn't recognized erroneously as a hook.

foxoninetails_
welcome to shbcf.ru