Activity for Adám
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Answer | — |
A: Make a frequency table (histogram) 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 tally of indices (more) |
— | almost 2 years ago |
Answer | — |
A: Repeat the characters [APL (Dyalog Unicode)], 1 byte / Try it online! `/` is called Replicate. (more) |
— | over 2 years ago |
Answer | — |
A: Multiply two strings 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 as an affine space which is basically a fancy name for each character being an integ... (more) |
— | over 2 years ago |
Answer | — |
A: Small integer swapping [APL (Dyalog Extended)], 3 bytes ⊢⍮⌽ Try it online! `⊢` the argument `⍮` paired up with `⌽` its reverse (more) |
— | over 2 years ago |
Answer | — |
A: Are All Elements Equal? [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 argument into descending order If they are identical (`≡`), all elements must be eq... (more) |
— | over 2 years ago |
Answer | — |
A: Reduce over the range [1..n] [APL (Dyalog Unicode)], 4 bytes ```apl ⎕/⍳⎕ ``` Try it online! `⎕` input `/` reduction over `⍳` the integers until `⎕` input. (more) |
— | over 2 years ago |
Answer | — |
A: It's Hip to be Square [APL (Dyalog Extended)], 3 bytes √∊… Try it online! Is the square root in the range? (more) |
— | over 2 years ago |
Answer | — |
A: Word Count Tool [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 patterns (`⍺`) and the entire string (`⍵`): `⊢⍵` on the string `⍺⎕S⍬` find matches... (more) |
— | almost 3 years ago |
Answer | — |
A: Is it a near-anagram? [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 argument:  `↑` mix the list of strings into a 2-row character matrix (padding any... (more) |
— | about 3 years ago |
Answer | — |
A: Word Set Square [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 `(`…`)` apply the following tacit function to that:  `⊢` on the characters o... (more) |
— | about 3 years ago |
Question | — |
Shape of an array 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 assume that the given array has at least one empty dimension, and that only the trailing dimension can hav... (more) |
— | over 3 years ago |
Question | — |
Link with Stack Exchange 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 transfer your content. Maybe codegolf.stackexchange.com would be an appropriate candidate? (more) |
— | over 3 years ago |
Answer | — |
A: Weave Strings Together [APL (Dyalog Unicode)], 10 bytes Full program. Prompts for list of strings from stdin. ```apl 0⍨,⍉↑0,¨⎕ ``` Try it online! `⎕` prompt for list of strings `0,¨` prepend a zero to each `↑` convert to orthogonal matrix (increase rank at cost of depth), padding with 0s `⍉` transpose ... (more) |
— | over 3 years ago |