Linked Questions

73
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 <...
40
votes
55answers
4k views

An abundance of integers!

An Abundant number is any number where the sum of its proper divisors is greater than the original number. For example, the proper divisors of 12 are: ...
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 ...
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 ...
26
votes
29answers
2k views

Rotation summation

Take a square matrix containing positive integers as input, and calculate the "rotated sum" of the matrix. Rotated sum: Take the sum of the original matrix and the same matrix rotated 90, 180 and ...
15
votes
39answers
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\$ ...
16
votes
17answers
2k views

Alternating Pattern

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

g​o​l​f​ ​a​t​a​n​2

Sometimes it really is a struggle to convert Cartesian coordinates (x,y) to Polar coordinates (r,phi). While you can calculate <...
16
votes
13answers
892 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, say you ...
14
votes
10answers
915 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 ...
22
votes
8answers
539 views

Heightmap of Boxes

Have a look at this ascii art diagram of various boxes: ...
9
votes
9answers
610 views

Love Tester Code Golf

Create program that counts the total number of letters common to two names, and finds the product of their lengths, to function as a "love tester." Conditions: you may not get a 1:1 answer (being 3 ...