Linked Questions

13
votes
18answers
1k views

Name the Aztec year

It's time for another Mesoamerican calendar! The Xiuhnelpilli was used by the Aztecs (more properly, the Mexica) to name their years. Each year has a number and a sign. Here's part of the cycle: <...
12
votes
8answers
1k views

Bit delivery in Bin City

sandbox Story Similar to a newspaper route you have been tasked with delivering bits to the residents of Bin City. Just as certain people like certain newspapers, the citizens of Bin City prefer ...
17
votes
20answers
2k views

Pendulum Encoding

Given a string as an input (which can be any acceptable/convenient format in your language), implement pendulum encoding. The test cases are split into individual items (which aren't quoted) for a ...
6
votes
40answers
1k views

Add N numbers without using + or -

Given N integers, output the sum of those integers. Input You may take the integers in any reasonable format, including: stdin arguments an array or list Rules ...
15
votes
21answers
2k views

The SBEVE Challenge

She said s(he) be(lie)ve(d), he said sbeve. Input A non-empty string, s. It's guaranteed that s will have only printable ASCII ...
15
votes
26answers
1k views

pleTriwapt Sgpin (Triplet Swapping)

Intro/Background I was looking at a Flybuys card at Coles recently and noticed that if I took something like this: Source, randomly found on the Internet And swapped some words around, I'd get ...
13
votes
17answers
2k views

Generate input for this hardware

I have a hardware that has a 32-bit input register. The register has the following characteristics: The 32-bit register consists of eight 4-bit fields. Each 4-bit field holds a value in signed-...
25
votes
25answers
3k views

Print the sequence

21, 21, 23, 20, 5, 25, 31, 24, ? Inspired by this Puzzle, given an integer \$n>0\$ , print out the following sequence until you reach a non-Integer (spoilered, in case you want to solve the puzzle ...
15
votes
41answers
2k views

Sum square difference

The sum of the squares of the first ten natural numbers is, \$1^2 + 2^2 + \dots + 10^2 = 385\$ The square of the sum of the first ten natural numbers is, \$(1 + 2 + ... + 10)^2 = 55^2 = 3025\$ ...
18
votes
51answers
3k views

The max() is not enough

Intro A friend posed this question today in a slightly different way - "Can a single [Python] command determine the largest of some integers AND that they aren't equal?". While we didn't find a way ...
52
votes
30answers
6k views

Let's golf a BIBABOBU decoder

While I was traveling in the future, I noticed a funny game among kids circa 2275. When they don't want their great-great-great-great-grand parents to understand what they're saying, they use the ...
16
votes
17answers
3k views

Alternating Pattern

In a now deleted stackoverflow question, someone posted the following: Write a program or function to print alternating patterns in * and ...
14
votes
10answers
1k views

Area enclosed by perimeter loop

Find the area of a region of unit cells given its perimeter loop as a sequence of 90-degree turns. For example, take the three-cell region XX X whose perimeter ...
16
votes
13answers
917 views

Running gene crossover algorithm

Your task is to accept as input two gene sequences, and a sequence of "cross over points", and return the gene sequence that results from the indicated cross overs. What I mean by this is, ...
77
votes
30answers
12k views

Create an “H” from smaller “H”s

Challenge Create a function or program that, when given an integer size, does the following: If size is equal to 1, output ...

15 30 50 per page