Posts by Adám
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...
APL (Dyalog Unicode), 1 byte / Try it online! / is called Replicate.
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 Extended), 3 bytes ⊢⍮⌽ Try it online! ⊢ the argument ⍮ paired up with ⌽ its reverse
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...
APL (Dyalog Unicode), 4 bytes ⎕/⍳⎕ Try it online! ⎕ input / reduction over ⍳ the integers until ⎕ input.
APL (Dyalog Extended), 3 bytes √∊… Try it online! Is the square root in the range?
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 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...
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 (…) ...
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...
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 ...
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...