Linked Questions

68 votes
69 answers
10k views

Dropsort, designed by David Morgan-Mar, is an example of a linear-time "sorting algorithm" that produces a list that is, in fact, sorted, but contains only some of the original elements. Any ...
SuperJedi224's user avatar
57 votes
64 answers
9k views

Today, we're going to make an ASCII hexagon. You must write a program or function that takes a positive integer n, and outputs a hexagon grid of size n, made up of asterisks. For example, a hexagon of ...
DJMcMayhem's user avatar
  • 60.1k
33 votes
65 answers
8k views

Write the shortest program that takes one input (n) from STDIN (or equivalent) and outputs a simple incrementing function with one argument (x) that returns x + n but the function must be in a ...
Blake Lockley's user avatar
49 votes
46 answers
10k views

The Ackermann function is notable for being the one of the simplest examples of a total, computable function that isn't primitive recursive. We will use the definition of \$A(m,n)\$ taking in two ...
algorithmshark's user avatar
18 votes
64 answers
6k views

Your task is to create a program or function which randomly errors. Specifically, there must be a nonzero probability of erroring, but also a nonzero probability of running without error. An error is ...
rydwolf's user avatar
  • 19.3k
25 votes
11 answers
1k views

Your company is just getting started on a project, and for the first time you decided to go use a functional programming code-style. However your boss is really diffident and doesn't want to use built-...
WizardOfMenlo's user avatar
27 votes
7 answers
2k views

I like golfing in tinylisp: (d M(q((x)(i x(i(disp x)0(M x))0 But I also like posting explanations with nicely formatted code: ...
DLosc's user avatar
  • 40.7k
11 votes
14 answers
2k views

Introduction cowsay is a Unix command made by Tony Monroe, written in Perl. It outputs a picture of a cow saying given text. For example: ...
Makonede's user avatar
  • 6,809
28 votes
6 answers
1k views

The goal of this challenge is to fill a niche that is mostly lacking on this site. In my observations there most parsing verification challenges fall into two categories: Super easy parsing. This ...
Wheat Wizard's user avatar
  • 103k
11 votes
4 answers
1k views

EDIT: As some of you suspected, there was a bug in the official interpreter: the order of composition in . was reversed. I had two versions of the interpreter, and ...
Zgarb's user avatar
  • 43.2k
7 votes
8 answers
396 views

As a programmer or computer scientist one might encounter quite a lot of trees - of course not the woody growing-in-the-wrong-direction kind, but the nice, pure mathematical kind: ...
Laikoni's user avatar
  • 26.4k
9 votes
5 answers
468 views

tinylisp is, in its essence, a very stripped-down version of Lisp, as the name suggests. It was made by @DLosc for an "interpret this language" challenge, which can ...
clismique's user avatar
  • 7,000
8 votes
5 answers
447 views

What general tips do you have for golfing in Acc!!? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Acc!! (e.g. "remove comments&...
Mukundan314's user avatar
  • 13.7k