Search
Bitwise operations (WIP) Befunge, rather pointedly, lacks bitwise ops. No shifts, no and, no or, no xor. Shifts Shifts can be implemented as multiplication and division by powers of two. Shifts...
Don't require example code In general, I believe the decision should be on the challenge creator. Requiring it would be useless for certain types of challenges (kolmogorov-complexity or similar), ...
Shakespeare Programming Language, 11232 bytes My last attempt was nearing the 20000 byte zone, because it didn't use the stack at all. a.Ajax,.Puck,.Ford,.Act I:.Scene I:.[Enter Ajax and Puck]Aja...
RoadLang, 340 bytes wagwan my slime x is 0 rip dat bong till x bigger den 99 n dat x is x n 1 ayy bossman (x leftova 15) be 0 init bruv man say"FizzBuzz" yeah init bruv ayy bossman (x lef...
C, 66 59 bytes -7 bytes thanks to Lundin! In-place string reversal f(char*s){s[1]?f(s+1):0;for(char t=*s;s[1];*++s=t)*s=s[1];} Try it online!
Golfing numbers Numbers above 15 and below zero take more than one byte to create. Here's a table of numbers up to 100 (Not including negatives yet) Table for '98 NOTE: For numbers that are al...
Post tips for Befunge code golf here! This is based on a type of question I used to see on CGCC, where people would post tips for golfing in various languages. They happened to be quite helpful, s...
C (gcc), 62 bytes main(){char b[99],*p=strchr(gets(b),0);for(;p-->b;)putch(*p);} This relies on the usual gcc extension abuse. It assumes that max user input is 98 characters + null term, si...
Ahead, 3 bytes SW@ S Slurp entire input to stack W Write entire stack @ End Try it online!
Ruby, 14 bytes ->s{s.reverse} Try it online! a straightforward builtin.
Laser, 9 bytes c⌜ps \U# My own language's showcase time! This is a 2D language with an instruction pointer initially pointing to the right. It takes implicit input as an array of characters. ...
JavaScript, 25 24 bytes -1 byte thanks to @Arnauld f=([a,...b])=>a?f(b)+a:b Try it online!
Japt, 1 byte w Uh... yeah. Probably similar solutions for many other golf langs. Try it
Befunge-98, 45 39 37 33 29 21 bytes v:~< >a-| >v$< ,: ^_@ Try it online! This answer probably sucks :P
Your goal is to reverse an ascii string. Given a (optionally newline or null terminated) input, output your input in reverse order, optionally followed by a newline. Terminate afterward. Function...
I feel it'd be a good idea to require, or at least heavily encourage, that challenges include an example, ungolfed, readable solution in a non-golf language like Javascript, C, Rust, or Python. Th...
C (gcc), 114 bytes f(int n,int*p,int*i,int**o){if(n){int*m=i,k;for(;*m!=*p;++m);k=m-i;f(k,p+1,i,o);f(n-k-1,p+k+1,m+1,o);*(*o)++=*p;}} Try it online! Arguments: n is the length of the arra...
Definitions A binary tree is either a null (leaf), or an object (node). A node contains a value (non-negative integer) and two pointers (left and right) to two separate binary trees. A binary tre...
Haskell, 37 bytes f(h:t)=max(1+f[x|x<-t,x>h])$f t f _=0 Try it online!
Husk, 10 bytes L►LfΛo<0-Ṗ Try it online! Explanation L►LfΛo<0-Ṗ Ṗ power set of input f get elements which match the following: Λo - all pairwise difference...
Please welcome your new moderators: Quintec, Chris Jester-Young, and Jo King. All three have community support and I said "at least two", so we're happy to appoint all three as temporary moderator...