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 »

Search

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
 
66%
+2 −0
Challenges 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

posted 3y ago by caird coinheringaahing‭

Answer
66%
+2 −0
Sandbox Multiply two strings [FINALIZED]

posted 3y ago by celtschk‭  ·  edited 2y ago by trichoplax‭

66%
+2 −0
Challenges Are All Elements Equal?

JavaScript, 20 bytes Outputs false for truthy and true for falsey. a=>a.some(x=>x-a[0]) Try it online! Outputs true and false as normal. a=>new Set(a).size<2 Try it online!

posted 3y ago by Shaggy‭  ·  edited 3y ago by Shaggy‭

Answer
66%
+2 −0
66%
+2 −0
Sandbox Is it a near-anagram? [FINALIZED]

posted 4y ago by snail_‭  ·  edited 4y ago by snail_‭

66%
+2 −0
Challenges Solve Goldbach's Conjecture

JavaScript (Node.js), 87 bytes f=(a,b=2,c=a-b,d=(a,b=2)=>b<a?a%b&&d(a,b+1):1,e=a=>d(++a)?a:e(a))=>d(c)?[b,c]:f(a,e(b)) Try it online!

posted 4y ago by Hakerh400‭

Answer
66%
+2 −0
Challenges Solve Goldbach's Conjecture

Husk, 9 bytes ḟo=⁰Σπ2İp Try it online! Explanation ḟo=⁰Σπ2İp İp take the infinite list of primes π2 cartesian power 2 (all possible pairs) ḟo first pair which satisfie...

posted 4y ago by Razetime‭

Answer
66%
+2 −0
Challenges Win a War (or at least a few battles)

JavaScript, 227 bytes (n,k,A,C=(a,b)=>a?[...C(--a,b),b(a)]:[],f=m=>m?C(n+1,i=>f(m-1).map(([p,s])=> [[...p,i],s+i])).flat():[[[],0]])=>f(k).map(([b,s])=>a=s-n?a:b.map((a,b)=&gt...

posted 4y ago by Hakerh400‭  ·  edited 4y ago by Hakerh400‭

Answer
66%
+2 −0
Sandbox Interleave multiple arrays at once

posted 4y ago by moony‭  ·  edited 4y ago by moony‭

Article code-golf
66%
+2 −0
Challenges The Pell Numbers

Python 3, 39 bytes f=lambda x:x if x<2else 2*f(x-1)+f(x-2) Generic recursive implementation Try it online!

posted 4y ago by Quintec‭

Answer
66%
+2 −0
Challenges The Pell Numbers

APL (Dyalog Classic), 20 18 17 16 bytes ⊢/,+.×⍣⎕⍨∘.+⍨⌽⍳2 Matrix implementation, requires ⎕IO←0. Thanks to @Razetime for the idea, -3 bytes by me Try it online! APL (Dyalog Classic), 19 18 byt...

posted 4y ago by Quintec‭  ·  edited 4y ago by Quintec‭

Answer
66%
+2 −0
Challenges Ratio limits of fibonacci-like series

Stax, 5 bytes òP^↓Φ Run and debug it Same idea as Quintec's answer. Input as a floating point number. Explanation 1gpun+ 1 start with 1 gp apply the following till a fixpoint...

posted 4y ago by Razetime‭  ·  edited 4y ago by Razetime‭

Answer
66%
+2 −0
Challenges "Hello, World!"

PowerShell, 15 bytes "Hello, World!" Try it online!

posted 4y ago by Wasif‭

Answer
66%
+2 −0
Challenges Cumulative Counts

Jelly, 7 bytes =þ`ÄŒDḢ Try it online!

posted 4y ago by hyper-neutrino‭

Answer
66%
+2 −0
Challenges Cumulative Counts

Scala 3, 50 44 bytes ? => ?.indices zip?map(?take _+1 count _.==) Try it in Scastie! This is an annoying, stupid approach. The more elegant one using inits was much longer (x=>x.inits.to...

posted 4y ago by user‭  ·  edited 3y ago by user‭

Answer
66%
+2 −0
Challenges Cumulative Counts

Husk, 4 bytes Sz#ḣ Try it online! Explanation Sz#ḣ Sz zip the input ḣ with its prefixes # using the count function

posted 4y ago by Razetime‭

Answer
66%
+2 −0
Challenges Beaver Code Decryption

APL(Dyalog Unicode), 34 29 bytes SBCS Saved 5 bytes thanks to Razetime! {2>s←⌈2÷⍨≢⍵:⍵⋄,⍉↑∇¨s(↑,⍥⊂↓)⍵} Try it on APLgolf! {2>s←⌈2÷⍨≢⍵:⍵⋄,⍉↑∇¨s(↑,⍥⊂↓)⍵} { } ...

posted 4y ago by user‭  ·  edited 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Obligatory Quine Challenge

BQN, 14 bytesSBCS ∾⟜•FMT"∾⟜•FMT" Run online! Assumes •FMT will format a string by placing it in quotes, which depends on the BQN system in use. After (⟜) applies its right operand •FMT to the ...

posted 4y ago by Marshall Lochbaum‭

Answer
66%
+2 −0
Challenges Truthify an array

Scala 3, 68 bytes _.zipWithIndex.flatMap(_.zipWithIndex.filter(_._1)map(_._2)map _.->) Try it in Scastie! Takes a List[List[Boolean]], returns a List[(Int, Int)]. This abuses underscores a ...

posted 4y ago by user‭  ·  edited 4y ago by user‭

Answer
66%
+2 −0
Challenges Win a War (or at least a few battles)

BQN, 44 bytesSBCS +´{(≠↑𝕨-𝔽)⊸+2↓⊑∨(≍×𝕨≥⊢)○𝔽˜⟜×⊸∾¨(<1+𝕩)×⥊↕2¨𝕩} Run online! The solution is a function that takes n as the left argument (𝕨) and A as the right argument (𝕩). k is just the le...

posted 4y ago by Marshall Lochbaum‭

Answer
66%
+2 −0
Challenges Length of a Sumac Sequence

BQN, 15 bytesSBCS {𝕨(1+⊢𝕊-)⟜𝕩⍟>0} Run online! A block function that takes $t_1$ as the left argument 𝕨 and $t_2$ as the right argument 𝕩. In BQN, 𝕊 indicates recursion on the current block ...

posted 4y ago by Marshall Lochbaum‭

Answer
66%
+2 −0
Challenges Length of a Sumac Sequence

Scala, 83 bytes x=>x.init#::Stream.iterate(x)(x=>x++(x,x.tail).zipped.map(_-_))indexWhere(_.last<1) Try it online! Takes input as a list of two numbers. The fact that the length can...

posted 4y ago by user‭  ·  edited 4y ago by user‭

Answer
66%
+2 −0
Challenges Weave Strings Together

BQN, 8 bytesSBCS ∾⊒˜¨⊔○∾⊢ Run online! and parsing diagram The idea here is to build a list of groups, with group i containing the ith character of each string that has one, then join the group...

posted 4y ago by Marshall Lochbaum‭

Answer
66%
+2 −0
Challenges Make my number a set

Jq, 19 bytes def s:[range(.)|s];

posted 4y ago by Wezl‭

Answer
66%
+2 −0
Challenges Juggler sequences

Python 3, 64 bytes def f(n): z=[n] while n>1:n=int(n**((n+.5)%2));z+=n, return z Try it online!

posted 4y ago by SherlockSage‭

Answer