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
 
50%
+0 −0
Challenges Cumulative Counts

Factor, 122 bytes USING: kernel sequences sequences.windowed ; IN: c : c ( s -- s ) dup length [ dup last [ = ] curry count ] rolling-map ;

posted 1y ago by gifti‭

Answer
50%
+0 −0
Challenges Make a frequency table (histogram)

Ruby, 12 bytes ->{_1.tally} Attempt it online!

posted 1y ago by south‭

Answer
50%
+0 −0
Challenges Partial Sums of Harmonic Series

Goruby, 38 bytes ->n{dw{$.+=1;$..mp{1.0/-~_1}.su<n};$.} This was not as much fun as I thought it would be, but it was fun enough to use once.

posted 1y ago by south‭

Answer
50%
+0 −0
Challenges Cumulative Counts

Python 3, 70 bytes def f(a): d={};r=[] for x in a:d[x]=d.get(x,0)+1;r+=[d[x]] return r Try it online!

posted 1y ago by __blackjack__‭

Answer
50%
+0 −0
Sandbox Mark my beacons

posted 1y ago by Razetime‭

Article code-golf matrix
50%
+0 −0
Challenges Find n Niven Numbers

Japt, 10 bytes ÈvXìx}jU1ì Try it

posted 1y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Make a frequency table (histogram)

Japt, 8 bytes ü ®â pZl Try it

posted 1y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Create a range grid

Japt -m, 4 bytes VÆT° Try it

posted 1y ago by Shaggy‭

Answer
50%
+1 −1
Meta Filtering the sandbox for ease of feedback

Both tags and [FINALIZED] are problematic Problem with tags Having been shown the related meta post Separate the tags away from the Sandbox or delete the [finalized] tag I can now see that having...

posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

Answer
50%
+0 −0
Challenges "Hello, World!"

Z80 Assembler, 50 bytes org 256 ld de,m ld c,9 jp 5 m:db"Hello, world!\r$" With assembler there's usually the problem which machine or operating system the program is for. I've chosen CP/M ...

posted 1y ago by __blackjack__‭

Answer
50%
+0 −0
Challenges Presumptuous base conversion

C (gcc), 117 bytes b,r;f(char*s){char*p=s;for(;*p;p++)*p-=47+7*(*p>57),b=b<*p?*p:b;if(b<2)return p-s;for(;*s;s++)r*=b,r+=*s-1;return r;} Try it online!

posted 1y ago by celtschk‭

Answer
50%
+0 −0
Challenges "Hello, World!"

C (gcc), 46 bytes printf(char*);main(){printf("Hello, World!");} printf(char*);(14 bytes) is better than #include <stdio.h>\n(19 bytes)

posted 1y ago by Wyattk1093‭  ·  edited 1y ago by Wyattk1093‭

Answer
50%
+0 −0
Challenges Determine whether an integer is square-free

JavaScript, 31 bytes Outputs 0 for falsey and a non-zero value for truthy. If the 2 values must be consistent then replace the last * with && to output true instead. n=>(g=d=>d++&...

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

Answer
50%
+0 −0
Sandbox 3D compass point from 3D coordinates

posted 1y ago by trichoplax‭  ·  edited 8mo ago by trichoplax‭

50%
+0 −0
Challenges Rationalise recurring binary

Given a potentially recurring binary string, output the number it represents, as a fraction in lowest terms. The notation used in this challenge for recurring digits is non-standard. An r is used ...

0 answers  ·  posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

50%
+1 −1
Meta Default Rules: Extensions

Implementation defines the language, so if you use extensions to a language, you should add + ... extensions to the header. E.g. for a C post using gcc extensions, the header begin with # C (gcc...

posted 2y ago by Moshi‭

Answer
50%
+1 −1
Meta Default Rules: Extensions

The C (gcc) implies extensions - it will only work with that specific compiler under it's default setting GNU17 (equivalent to -std=gnu17), which is mostly a superset of standard C. This also inclu...

posted 2y ago by Lundin‭

Answer
50%
+0 −0
Meta Add detailed wikis and usage info on these tags

graphical-output Usage info: Graphical output challenges involve outputting images or illustrations using graphics. Detailed wiki: (uses text from CGCC's) Graphical output challenges invol...

posted 3y ago by General Sebast1an‭

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

Python 3, 167 127 118 117 94 63 bytes def f(a,b): y=0 for z in range(len(a)):y+=a[z]*b**z print(y) Try it online! Close gap to @user's lambda answer! Golfed 40 bytes thanks to @user's...

posted 2y ago by General Sebast1an‭  ·  edited 2y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges Getting perfect squares, differently

C (clang), 47 45 43 bytes i,j;main(){for(;printf("%i ",i-=~j);j+=2);} Try it online! Golfed 2 bytes from inspiration of @Shaggy's answer. Golfed 2 bytes by @m90.

posted 3y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Answer
50%
+0 −0
Q&A Tips for golfing in C

Abuse (as few) libraries (as possible) We don't want to use too much libraries when playing challenges. Sometimes, libraries aren't used at all in some answers in C. What if we want to shorten so...

posted 3y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges Getting perfect squares, differently

Python 3, 34 bytes x=0;y=1 while 1:x+=y;print(x);y+=2 Try it online! 1 is the int equivalent to True, which helps save bytes.

posted 3y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Answer
50%
+0 −0
Challenges Collatz conjecture; Count the tries to reach $1$

Java (JDK), 150 bytes interface M{static void main(String[]a){int i=new java.util.Scanner(System.in).nextInt(),j=0;for(;i!=1;j++){i=i%2==1?i*3+1:i/2;}System.out.print(j);}} Try it online! Fr...

posted 2y ago by General Sebast1an‭

Answer