Posts by Adám
APL (Dyalog Extended), 18 bytes Anonymous tacit prefix function taking a list of two strings as argument. 2=1⊥(≠⌿∊≢⍤⊢⌸⍤,⍤1↑) Try it online! (…) apply the following tacit function to the arg...
Given a non-ragged array (an array where all sub-arrays at a particular level have the same length) of non-negative integers, answer its shape, that is, the length along every dimension. You may as...
APL (Dyalog Unicode), 23 bytes Anonymous tacit prefix function. Reuires 0-based indexing (⎕IO←0) (⊢⍪⍨¯1↓⊢,∘↑-∘⍳∘≢↑¨⊢)⊢,⌽ Try it online! ⌽ reverse the argument ⊢, prepend the argument (…) ...
APL (Dyalog Unicode), 10 bytes Full program. Prompts for list of strings from stdin. 0~⍨,⍉↑0,¨⎕ Try it online! ⎕ prompt for list of strings 0,¨ prepend a zero to each ↑ convert to orthogona...
APL (Dyalog Extended), 3 bytes √∊… Try it online! Is the square root in the range?
APL (Dyalog Unicode), 3 bytes ⍋≡⍒ Try it online! ⍋ computes the permutation vector that would sort the argument into ascending order ⍒ computes the permutation vector that would sort the ar...
When editing my profile, I see: Link with Stack Exchange You can't link a Stack Exchange account to your account on this site because there is no associated Stack Exchange site from which to ...
BQN, 3 bytes Anonymous tacit infix function, taking the second string as left argument and the first string as right argument. ⥊⌊⌜ ⌊⌜ minimum table ⥊ deshape (flatten) BQN treats characters ...
APL (Dyalog Unicode), 27 bytes Anonymous tacit prefix function '\w+' '.' '[^ ]'{≢⍺⎕S⍬⊢⍵}¨⊂ Try it online! '\w+' '.' '[^ ]'{…}¨⊂ apply the following anonymous lambda on each of the PCRE patt...
APL (Dyalog Unicode), 4 bytes ⎕/⍳⎕ Try it online! ⎕ input / reduction over ⍳ the integers until ⎕ input.
APL (Dyalog Unicode), 1 byte / Try it online! / is called Replicate.
APL (Dyalog Extended), 3 bytes ⊢⍮⌽ Try it online! ⊢ the argument ⍮ paired up with ⌽ its reverse
APL(Dyalog Unicode), 4 bytes SBCS Anonymous tacit prefix function. ,∘≢⌸ Try it on APLgolf! …⌸ between each unique element and its indices, apply: ,∘≢ concatenate the unique element to the ta...