Search
Japt -P, 7 2 bytes Õc Takes input as character arrays. -5 bytes thanks to @Shaggy Try it
Haskell, 40 bytes f((h:t):r)=h:f(r++[t]) f(_:r)=f r f _=[] Try it online!
C (gcc), 108 bytes *h,i;main(){for(;i++<100;){char s[]="%dFizzBuzz ",b=i%5;h=s+2;printf(s+(i%3?b?*h=32,0:6:b?h[1]=32,2:2),i);}} Godbolt. Works on clang too. Contains some serious abuse of al...
Given an array of numbers, output the length of the longest increasing (not necessarily contiguous) subsequence. It is guaranteed that there are no duplicates in the array. For example, if the inpu...
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. ...
Ruby, 14 bytes ->s{s.reverse} Try it online! a straightforward builtin.
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...
Japt, 4 bytes P1 is: +"+U Try it Which outputs P2, where N1 is the input from P1: N1+U Try it
Vyxal Ṫ, 3 bytes ?\? Try it Online! Outputs N1?, which when run with the same flag as P1, will add the two inputs together. Try it Online!
Japt, 3 bytes ÆßX Try it online! (don't mind the -Q This is Shaggy's solution. ÆßX Æ Make a range [0, input) and map each number X: ß Run this program again on X Japt, 11 8 bytes ...
Empty answers to questions requiring an interpreter In particular, "simulating" a machine on this very machine by accepting the initial state as the simulation's initial state and returning t...
JavaScript (Node.js), 67 60 bytes o=>r=>Buffer(o).map(c=>c%32<26&c>64?(c%32+r)%26+c-c%32:c)+'' Try it online! o=>r=> // Define a function taking o an...
Free as in usable on a free platform "free" meaning there must be a downloadable interpreter available for the language which can run the program with the required features, on an online/offline s...
C is a language I use most apart from Python and as someone who likes code golf challenges, what tips are there to golf in C?
The Rules In this game, each round, every player faces off against every other player in a round robin format. In each match, players pick 3 positive integers that sum to 360. Let's say player 1 p...
MoshiBot from numpy.polynomial import Polynomial def MoshiBot(data, history): if len(history) < 10: return [180, 180, 0] lastmin = min(history[-1]) lastmid = sorted(history[-1])[1] ...
COPS THREAD A famous cops-and-robbers challenge whose source shall remain unnamed is brought to Codidact. You are a robber. Your goal is to find answers on this link which haven't been cracked an...
Japt, 6 3 bytes Cut in half thanks to Shaggy! ¬v1 Try it online! Golfed thanks to Shaggy's interpreter auto-golf feature. ¬v1 ¬ //Square root v1 //Is that an integer?
Prolog (SWI), 42 bytes R-S:-S is R*R;R<S,M is R+1,M-S. f(S):-0-S. Try it online!
C or C++ (gcc) 220 bytes, cracked by Razetime %: %: define cops(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) if(not false and k%:%:f%:%:d%:%:l(& (not true) <:%:i%:j%:k%:l" "%:m" "%:n%:o%:p%:...
Python 2, 61 bytes i=12;exec"print'YWUSQOMKIGECABDFHJLNPRTVXZ'[i:14+i];i-=1;"*13 Try it online! I tried to do it without writing the full list 'YWUSQOMKIGECABDFHJLNPRTVXZ' but couldn't get l...