Linked Questions

43
votes
24answers
9k views

Cheat at Rock-Paper-Scissors-Lizard-Spock

When playing Rock-Paper-Scissors-Lizard-Spock, your robot reflexes let you see your opponent's throw before they make it. You just need to choose a throw that beats theirs, in as few bytes as possible ...
13
votes
11answers
2k views

Letters associated with prime numbers

If we assign each letter a respective integer, starting from 1, then a is 1, b is 2, c is 3, and so on. After z, the letters loop back around, but with a in front (aa, ab, ac). It then goes to ba, bb, ...
26
votes
33answers
5k views

Make a haystack (with a needle)

(Essentially the inverse of Find the needle in the haystack) Given two tuples, (w, h) and (x, y), generate a haystack composed ...
40
votes
18answers
10k views

Duck, duck, gone!

Here is the (quite scary) Five little ducks song(it is not long): ...
17
votes
10answers
1k views

Write a function that returns an iterable object of all valid points 4-directionally adjacent to (x, y)

A very common need in algorithms classes and computer science in general is to iterate 4-directionally over a grid or matrix (such as in BFS or DFS). This seems to often result in a lot of clunky and ...
66
votes
14answers
15k views

Draw the ☣ (Biohazard Symbol)

Draw the Biohazard symbol in an arbitrary colour on a distinctly coloured background. The specific proportions were published in the June 27th 1974 issue of the Federal Register of the US Government. ...
19
votes
12answers
2k views

Calculate Landau's function

Landau's function \$g(n)\$ (OEIS A000793) gives the maximum order of an element of the symmetric group \$S_n\$. Here, the order of a permutation \$\pi\$ is the smallest positive integer \$k\$ such ...
-9
votes
1answer
160 views

Bot Problem.How to solve this problem in c? [closed]

Programming problem: In BotLand, Robots can understand all words of any combination of letters and letters with leading or trailing (not both) numeric value. Given a word W (string of alphanumeric). ...
27
votes
10answers
2k views

Nothing like a good ol' game of ModTen

Disclaimer: ModTen is a fictional card game which was created for the sole purpose of this challenge. The rules of ModTen ModTen is played with a standard 52-card deck. Because the full rules are ...
55
votes
52answers
10k views

How much code would a codegolf golf if a codegolf could golf code?

Write a function or program that takes two words as input and outputs variants of the popular English tongue-twister "How much wood would a woodchuck chuck if a woodchuck could chuck wood?". The ...
34
votes
15answers
7k views

Generate Brainfuck for the numbers 1–255

Write a program that, for the numbers 1 through 255, prints out BF code that will produce the given number in some byte of the array, plus a newline. For example, the first four lines of the output ...
30
votes
17answers
3k views

A quine of sorts

Given a string x, output the characters in x sorted according to the order of appearance in your source code. Examples ...
41
votes
29answers
6k views

Nth term of Van Eck Sequence

Output the Nth term of the Van Eck Sequence. Van Eck Sequence is defined as: Starts with 0. If the last term is the first occurrence of that term the next term is 0. If the last term has occurred ...
16
votes
11answers
1k views

Generate basis elements of the Steenrod algebra

The Steenrod algebra is an important algebra that comes up in algebraic topology. The Steenrod algebra is generated by operators called "Steenrod squares," one exists for each positive integer i. ...
24
votes
9answers
2k views

Generate a Graeco-Latin square

disclaimer: I'm not aware of any non-bruteforce solutions A Graeco-Latin square is, for two sets of same length \$n\$, a \$n \times n\$ arrangement of cells, each containing a unique (across the ...

15 30 50 per page