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
1.6k posts
 
66%
+2 −0
Challenges Word Set Square

Ruby, 74 bytes Full program: s=gets+$_.reverse puts [s[0]]+s[1..-2].chars.zip(0..).map{_1+' '*_2+_1}<<s Note that this is not fit for interactive use because it looks weird when you inp...

posted 3y ago by Wezl‭

Answer
66%
+2 −0
Challenges Juggler sequences

Japt, 17 bytes Needs some more work. É?[U]cßÂUp½+Uu:1ì Try it If there's a proof that the length of the sequence for any given n never exceeds n**3 then ... Japt, 14 bytes NcU³Æ=Âp½+UuÃâ ...

posted 3y ago by Shaggy‭

Answer
66%
+2 −0
Challenges Evaluate a single variable polynomial equation

Python 3, 46 bytes f=lambda p,x,a=0:p and f(p[1:],x,a*x+p[0])or a Try it online! Takes input reversed.

posted 3y ago by user‭

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 "Hello, World!"

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

posted 3y ago by Wasif‭

Answer
66%
+2 −0
Challenges Cumulative Counts

APL (Dyalog Unicode), 11 7 bytes (SBCS) Razetime and rak1507 came up with 7 byte equivalents of my original dfn (this one's rak1507's). See their solutions below. +/¨⊢=,\ Try it online! +/¨...

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

Answer
66%
+2 −0
Challenges Cumulative Counts

Japt, 14 11 8 bytes £¯YÄ è¥X Try it -3 bytes thanks to @Shaggy

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

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 3y 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 3y 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 3y ago by user‭  ·  edited 3y 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 3y 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 3y 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 3y ago by user‭  ·  edited 3y 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 3y ago by Marshall Lochbaum‭

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

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

posted 3y 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 3y ago by SherlockSage‭

Answer
66%
+2 −0
Challenges Truthify an array

JavaScript (Node.js), 68 bytes f=(a)=>a.map((x)=>[...x.entries()].filter((e)=>e[1]).map((e)=>e[0])) Run the function f on your input, e.g. f([[1,0,1],[1,0,1],[0,1,0]]). The output ...

posted 3y ago by forestbeasts‭

Answer
66%
+2 −0
Challenges A number adder, not a death adder

Haskell, 64 bytes main=do a<-getLine;putStr$"main=getLine>>=print.("++a++"+).read" Try it online! Run both programs

posted 3y ago by Hakerh400‭

Answer