14,394 questions
4
votes
1
answer
171
views
Sequence of programs that prints the next one with length growth being equal to π
Challenge
You must produce an infinite sequence of programs \$P_0, P_1, P_2,\$ … such that each program \$P_n\$, when run, prints the exact source code of \$P_{n+1}\$ and then halts.
Each program \$...
9
votes
10
answers
455
views
Number of intersections between all ranges
Take an array of pairs [L, R]. Count the number of unique intersecting pairs.
A pair [L1, R1] intersects with the pair [L2, R2] if L1 <= L2 <= R1 or L2 <= L1 <= R2. L is guaranteed to be &...
9
votes
2
answers
447
views
Intersection check in the fewest operations
Challenge
Given two line segments, your goal is to write a function which determines if they intersect using only the operations given below:
Multiplication: x*y
...
2
votes
2
answers
111
views
Shortest Brainf*ck program that loads prime numbers into memory
Write the shortest Brainfuck program that loads all primes below 256 into memory consecutively. All other cells must be zero.
You may place them in whatever order you like, but they must be ...
5
votes
2
answers
205
views
Putting the pieces together
In this code-golf challenge, you will count the number of ways of putting together pieces of a building toy which consists of slotted squares that interlock with one another, shown below. In ...
22
votes
21
answers
3k
views
Reverse NATO Phonetic Spelling
NATO Phonetic Spelling is a way to spell out letters so that they're distinguishable over a noisy connection. The mapping of letters (stolen from here) is as follows:
...
7
votes
2
answers
965
views
+100
Shortest Brainf*ck program that loads all Brainf*ck instructions into memory
Write the shortest Brainfuck program that loads all code characters of Brainfuck commands into memory consecutively.
The Brainfuck instructions are:
...
6
votes
4
answers
429
views
Solve Queens Puzzle
Queens is a puzzle that consists of a NxN grid divided into continuous color regions.
Your goal is to have exactly one queen (Q) in each row, column, and color region
Two queens cannot be adjacent to ...
3
votes
4
answers
122
views
Shortest TeX document that generates ``Overfull \hbox`` Warning
Attempt to produce the shortest TeX document that generates the warning
Overfull \hbox (<x>pt too wide) in paragraph at lines <y>--<z>
that ...
7
votes
14
answers
958
views
555 Timer Calculator
The Challenge
In honour of getting 555 Rep, here's a little challenge to work out the frequency of a 555 Timer. The frequency can be worked out using
$$ f=\frac{1.44}{(R_1+2R_2)C_1} $$
Implement this ...
-6
votes
0
answers
62
views
Python equivalent for Indian DigiPIN conversion [closed]
Official repo as given by official Govt of India press release on DigiPIN, is: https://github.com/CEPT-VZG/digipin which is in JS.
The key file where the 2 main conversions (lat-lon to digipin and ...
3
votes
1
answer
132
views
Winding a Queue
You will be given a matrix. It contains a ride exit (with a direction), some path, as well as some obstacles. Your goal is to build the longest possible queue line in that space, which connects the ...
-4
votes
12
answers
230
views
Power Grid Management
You are writing the management software for one "node" of a power grid. A node has a layout like this
+
|
+---N---+
|
+
Each + is a ...
9
votes
6
answers
922
views
Solve Tango Puzzle
Tango is a puzzle that consists of a 6x6 grid partially filled with moons (M) and suns (S) and two lists of coordinate pairs, which we will call = and ...
13
votes
7
answers
802
views
Traverse the list
Update 2025-06-04: Thanks for the submissions everyone! It seems like a lot of the solutions are quite slow / timeout for the 100 length test case, so I don't think any will be able to do the 10k. ...