Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for caird coinheringaahing‭

Type On... Excerpt Status Date
Answer A: Roll n fair dice
[Jelly], 4 bytes X}€S Try it online! How it works X}€S - Main link. Takes n on the left, m on the right € - Over each element of 1 through n: } - With m as its argument: X - Yield a random integer from 1 to m S - Sum
(more)
over 2 years ago
Answer A: Multiply two strings
[Jelly], 2 bytes «þ Try it online! Technically speaking, this needs to be a full program, due to how Jelly's smash printing works, but it can get away with being run as a function over test cases. Essentially, this generates a matrix \$M\$ where \$M{ij}\$ is given by \$\min(ai, bj...
(more)
over 2 years ago
Answer A: Are All Elements Equal?
[Jelly], 1 byte E Try it online! Boring builtin answer Non builtin, the shortest I can get is 3 bytes: ḷ\⁼ Try it online! Here, we replace each element with the first element, then check if that is equal to the original array
(more)
over 2 years ago
Answer A: Reduce over the range [1..n]
[Jelly], 3 bytes Rç/ Try it online! Takes `f` as the helper link. Very basic, `R` casts to range, then `ç/` reduces by the helper link
(more)
over 2 years ago
Answer A: Add two negabinary integers
[Jelly], 6 bytes ḅSbɗ-2 Try it online! Takes input and output as a pair of lists of digits. The Footer converts to and from. Jelly's generalised base conversion works for all integer bases, and allows converting from complex bases. How it works ḅSbɗ-2 - Main link. Takes ...
(more)
almost 3 years ago
Answer A: Shuffle a subset of a list
[Jelly], 7 bytes œPżịẊ¥F Try it online! Takes the 1-indexed indices on the left and the list on the right How it works œPżịẊ¥F - Main link. Takes I on the left and L on the right œP - Partition L after the indices in I, removing the borders ¥ - Group th...
(more)
almost 3 years ago
Answer A: Evens or Odds - you know this one
[Jelly], 1 byte Ḃ Try it online! Builtin. Returns `0` for even and `1` for odd
(more)
almost 3 years ago
Answer A: Partial Sums of Harmonic Series
[Jelly], 8 bytes İ€S<¬ʋ1# Try it online! How it works İ€S<¬ʋ1# - Main link. Takes n on the left ʋ - Group the previous 4 links into a dyad f(k, n): € - Over each integer 1 to k: İ - Get its reciprocal S - Sum < ...
(more)
almost 3 years ago
Question Are they abundant, deficient or perfect?
Abundant numbers are numbers which are less than their proper divisor sum. For example \$18\$ is abundant as \$1 + 2 + 3 + 6 + 9 = 21 > 18\$ Deficient numbers are numbers which are greater than their proper divisor sum. For example, \$15\$ is deficient as \$1 + 3 + 5 = 9 [[12, 18, 20, 24, 30, 36,...
(more)
almost 3 years ago
Question Should challenges be worth 10 reputation?
The fourth highest voted CGCC Meta question asks that SE increases reputation for questions. This is now status completed across the entirety of the Stack Exchange network. However, I notice that it isn't active here. According to Monica Cellio, it's completely doable to change the reputation levels,...
(more)
almost 3 years ago
Answer A: Evaluation order of an APL n-train
[Jelly], 5 bytes ḶHĊUỤ Try it online! Uses xash's method over on CGCC How it works ḶHĊUỤ - Main link. Takes n on the left Ḷ - Range from 0 to n-1 H - Halve Ċ - Ceiling U - Reverse Ụ - Grade; Sort the indices of n by its ele...
(more)
almost 3 years ago
Answer A: Create an Alphabet Diamond
[Jelly], 13 bytes ØAUƤz⁶ZUŒBŒḄY Try it online! How it works ØAUƤz⁶ZUŒBŒḄY - Main link. Takes no arguments ØA - Yield the uppercase alphabet Ƥ - Over each prefix: U - Reverse it z⁶ - Zip, padding with spaces ...
(more)
almost 3 years ago
Answer A: Backspace an array
[Jelly], 6 bytes ṣ0Ṗ;¥/ Try it online! How it works ṣ0Ṗ;¥/ - Main link. Takes a list on the left ṣ0 - Split at zeroes ¥/ - Reduce by: Ṗ - Remove the last element ; - Concatenate
(more)
almost 3 years ago
Question Juggler sequences
A Juggler sequence is a sequence that begins with a positive integer \$a0\$ and each subsequent term is calculated as: $$a{k+1} = \begin{cases} \left \lfloor ak ^ \frac 1 2 \right \rfloor, & \text{if } ak \text{ is even}\\\\\ \left \lfloor ak ^ \frac 3 2 \right \rfloor, & \text{if } ak \text{ is...
(more)
almost 3 years ago
Answer A: Weave Strings Together
[Jelly], 2 1 byte Z Try it online! -1 byte thanks to Razetime! Full program How it works Z - Main link. Takes a list L on the left Z - Transpose Implicitly print, smashing lists together to form one string
(more)
about 3 years ago
Answer A: Beaver Code Decryption
[Jelly], 9 bytes ŒHß¹Ḋ?€ZẎ Try it online! How it works ŒHß¹Ḋ?€ZẎ - Main link f(S). Takes a string S on the left ŒH - Split S into two halves € - Over each half H: ? - If: Ḋ - Condition: H has more than 1 element ß...
(more)
about 3 years ago