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.5k posts
 
66%
+2 −0
Challenges Prove commutativity on this monoid presentation.

Given two binary strings $A$ and $B$ such that $A$ is an anagram of $B$, output a third binary string $S$ such that both $A$ and $B$ can be created by iterated removals of the substring $10101$ fro...

0 answers  ·  posted 11mo ago by WheatWizard‭

50%
+0 −0
Challenges Cumulative Counts

Haskell + hgl, 10 bytes mpn$ce~<gj Attempt This Online! Explanation mpn map across all non-empty prefixes of the input ... ce count the number of elements in each prefix equal to ... g...

posted 11mo ago by WheatWizard‭

Answer
60%
+1 −0
Challenges Calculate the Z-array

JavaScript (Node.js), 86 bytes X=>{Y=[];for(i in X)Y[i]=0,X.slice(i).map((a,b)=>a-X[b]?i='':Y[i]++);return Y.slice``} Attempt This Online! Using fancy notation, the time complexity is $...

posted 11mo ago by TheCodidacter, or rather ACodidacter‭  ·  edited 11mo ago by TheCodidacter, or rather ACodidacter‭

Answer
60%
+1 −0
Challenges Build a replacement ball in regex.

Haskell + hgl, 30 bytes ic"|"<<tv(:".")><fl<ce '.'><eq Attempt This Online! Explanation This performs a cartesian product to get all possible ways to replace characters w...

posted 11mo ago by WheatWizard‭

Answer
60%
+1 −0
Challenges Build a replacement ball in regex.

Vyxal, 62 bitsv2, ~8 bytes ẏḋ\.vȦ\|j Try it Online! Really 7.75 bytes, but leaderboard regex is a thing. Explained ẏḋ\.vȦ\|j ẏ # Range [0, len(X)) ḋ # n-length combinations...

posted 11mo ago by lyxal‭  ·  edited 11mo ago by lyxal‭

Answer
66%
+2 −0
Challenges Build a replacement ball in regex.

Ruby, 82 bytes ->w,n{[*0...w.size].permutation(n).map{e=w*1;_1.map{|x|e[x]='.'};e}.uniq.join '|'} Attempt This Online! uses permutation to do most of the work. Might be shorter with somethi...

posted 11mo ago by Razetime‭

Answer
66%
+2 −0
Challenges Are these reduced forms of the same thing?

Task You are going to take three strings as input $A$, $B$ and $X$. And your goal is to determine if there exists a third string $S$ such that both $A$ and $B$ can be formed by iteratively removin...

0 answers  ·  posted 11mo ago by WheatWizard‭  ·  edited 11mo ago by WheatWizard‭

66%
+2 −0
Challenges Build a replacement ball in regex.

In this challenge you will take a number $n$ and a string $X$ of length $\geq n$, and produce a regular expression which matches all strings that are withing $n$ character substitutions of $X$. Sp...

3 answers  ·  posted 11mo ago by WheatWizard‭  ·  last activity 11mo ago by WheatWizard‭

60%
+1 −0
Challenges Efficient censorship

Japt -h, 7 bytes à ñÊkøV Try it à ñÊkøV :Implicit input of strings U=X & V=Y à :Powerset of U ñ :Sort by Ê : Length k :Remove elements that...

posted 11mo ago by Shaggy‭

Answer
66%
+2 −0
Challenges Efficient censorship

Haskell + hgl, 14 bytes xBl<<ss><fn<iw Attempt This Online! Explanation ss gets all substrings of the input fn filters out the substrings that don't ... iw checks if the fo...

posted 11mo ago by WheatWizard‭  ·  edited 11mo ago by WheatWizard‭

Answer
66%
+2 −0
Meta Codidact Fractional Byte Consensus

I'm going to reiterate and build off ideas I laid out on this post on PPCG. First let's point out that at current the leader board does not support fractional scores. In this answer I am going to ...

posted 11mo ago by WheatWizard‭  ·  edited 11mo ago by WheatWizard‭

Answer
60%
+1 −0
Meta Codidact Fractional Byte Consensus

Over on the Code Golf StackExchange site, there is a meta consensus that answers can be scored in fractional bytes if there exists such an encoding method. So, to quote the linked consensus questi...

1 answer  ·  posted 11mo ago by lyxal‭  ·  last activity 11mo ago by WheatWizard‭

Question discussion
66%
+2 −0
Challenges Efficient censorship

Vyxal, 44 bitsv2, 5.5 bytes ṗ'⁰c¬;ÞG Try it Online! Or, try a test suite This is like the second time this week I've used powerset for golf on a site that isn't SE. Explained ṗ'⁰c¬;ÞG ṗ ...

posted 11mo ago by lyxal‭

Answer
66%
+2 −0
Challenges Efficient censorship

Python 3, 102 bytes def f(x,y): a=[x] for x in a: if y not in x:return x for i in range(len(x)+1):a+=[x[:i]+x[i+1:]] Try it online! Not exactly the most efficient, but it works. Ju...

posted 11mo ago by hyper-neutrino‭

Answer
81%
+7 −0
Challenges Efficient censorship

You are a low-level censor working for the Ministry of Media Accuracy. Part of your job is to make sure that certain words don't appear in publications. Every morning you get a fresh stack of next...

4 answers  ·  posted 11mo ago by WheatWizard‭  ·  last activity 11mo ago by Shaggy‭

Question code-golf string
66%
+2 −0
Challenges Connect the corners without 4 in a row

Haskell + hgl, 134 bytes k=cy"X.XX" x#1=[4,0,9,9]!x 2#y=8 3#y=[8,9,4,4]!y x#3=[0,3]!x _#_=0 x?y|(n,j)<-fvD 4$x%4#(y%4)=tk y$dr j$tk x<dr n<cy[dr2 k,k,cy".X",k] Attempt This Onlin...

posted 11mo ago by WheatWizard‭  ·  edited 11mo ago by WheatWizard‭

Answer
75%
+4 −0
Challenges Calculate the Z-array

Task Given a list of numbers $X$ produce a second list of numbers $Y$ such that $Y_i$ is the length of the longest common prefix of $X$ and $X$ with the first $i$ elements removed. For example if...

1 answer  ·  posted 11mo ago by WheatWizard‭  ·  last activity 11mo ago by TheCodidacter, or rather ACodidacter‭

Question code-golf list array
66%
+2 −0
Challenges Count polyomino bisections

An polyomino is a non-empty connected subset of the square tiling consisting of squares joined along their edges. We will not require that polyominos be simply connected, that is they can have hole...

0 answers  ·  posted 11mo ago by WheatWizard‭

71%
+3 −0
Challenges Label a hinged tetromino

Given a hinged tetromino, give it a unique, consistent label independent of location, rotation, and reflection. Tetrominoes A tetromino is a connected subset of the square tiling, composed of 4 s...

2 answers  ·  posted 11mo ago by trichoplax‭  ·  last activity 10mo ago by RubenVerg‭

60%
+1 −0
Sandbox Label the hinged tetrominoes - [FINALIZED]

posted 11mo ago by trichoplax‭  ·  edited 11mo ago by trichoplax‭

60%
+1 −0
Challenges Determine if a polyomino is "prime"

Rust, 425 bytes |a:T|a.iter().any(|b|a.iter().any(|c|c!=b&&f(&a,&vec![*b],&vec![*c])));fn g(a:&T,b:&T,c:&T,e:(i8,i8))->bool{[(0,1),(1,0),(-1,0),(0,-1)].iter().an...

posted 11mo ago by mousetail‭

Answer
66%
+2 −0
Challenges Determine if a polyomino is "prime"

An $n$-polyomino is a connected subset of the square tiling consisting of $n$ squares. We will not require that polyominos be simply connected, that is they can have holes. We will say a $n$-polyo...

1 answer  ·  posted 11mo ago by WheatWizard‭  ·  edited 11mo ago by WheatWizard‭

71%
+3 −0
Q&A Hosting fastest code challenges

If restricting everyone to the same system, then can force every contestant to use https://tio.run and the on-site bench-marking found below "debug" -> "real time" as efficiency metric. Example....

posted 11mo ago by Lundin‭

Answer
40%
+0 −1
Challenges Compute the determinant

Wolfram Language (Mathematica), 3 bytes Det Try it online!

posted 1y ago by aspen138‭

Answer