text stringlengths 180 608k |
|---|
[Question]
[
>
> ...Ordinal numbers (or ordinal numerals) are words representing position or rank in a sequential order.
>
>
>
[](https://i.stack.imgur.com/YOUmZ.png)
*From [Wikipedia](https://en.wikipedia.org/wiki/Ordinal_number_(linguistics))... |
[Question]
[
Your task is to find two missing characters in a Columbo episode title.
## Input
One of the 69 Columbo episode titles (as listed below), with exactly two characters replaced with `*`.
**Example**:
```
"Ran*om for a *ead Man"
```
## Output
You may either return the full episode title, or just the two mi... |
[Question]
[
# Background
Yes, bitstring physics is [a real thing](http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=363694&punumber%3D2948%26filter%3DAND%28p_IS_Number%3A8339%29%26pageNumber%3D2).
The idea is to construct a new theory of physics using only strings of bits that evolve under a probabilistic... |
[Question]
[
## CLOSED to competing entries
New bots are welcome but are not part of the main competition and probably won't be officially tested.
You stand on a dusty stretch of code, watching the other programs stare at you. Will they shoot? How much ammunition do they have left? All you know is that you want to ... |
[Question]
[
I [like](https://codegolf.stackexchange.com/questions/241650/sort-every-dimension) [to](https://codegolf.stackexchange.com/questions/233030/build-me-a-room) [pretty print](https://codegolf.stackexchange.com/questions/236884/remove-submatrices) multidimensional arrays, like this:
```
[ [ [1, 2, 3],
... |
[Question]
[
## Background
A **[Jordan matrix](https://en.wikipedia.org/wiki/Jordan_matrix)** is a block-diagonal matrix where each block on the diagonal has the structure of
$$
\begin{bmatrix}
\lambda & 1 & 0 & \cdots & 0 \\
0 & \lambda & 1 & \cdots & 0 \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
0 & 0 & 0 & ... |
[Question]
[
A balanced string is a string of parentheses `()` so that every parenthesis is can be matched with another one. More rigorously they are the strings spanned by this grammar:
```
S → (S)S | ε
```
We can turn a string "inside out" by:
* Switching all occurrences of `(` and `)` with each other
* Moving ch... |
[Question]
[
Your task is to create a program or function that generates a zipper with a length of 10 lines. Each line of the zipper is represented by two dashes `--`:
```
--
--
--
--
--
--
--
--
--
--
```
The program/function will take a percentage (divisible by 10) as input, and the output will be the zipper "unz... |
[Question]
[
A divisor of a number *n* is any number that evenly divides *n*, including 1 and *n* itself. The number of divisors *d(n)* is how many divisors a number has. Here's *d(n)* for the first couple n:
```
n divisors d(n)
1 1 1
2 1, 2 2
3 1, 3 2
4 1, 2, 4 3
5 ... |
[Question]
[
In this code golf, you need to get the closest number from another one in a list.
The output may be the closest number to the input.
Example:
```
value: (Input) 5 --- [1,2,3] --- 3
```
And, the program may work with negative numbers.
Example:
```
value: (Input) 0 --- [-1,3,5] --- -1
value: (Input) 2 --... |
[Question]
[
### The Background
Folks were talking prime factorization in [chat](http://chat.stackexchange.com/transcript/240/15-17) and we found ourselves talking about repunits. [Repunits](https://en.wikipedia.org/wiki/Repunit) are a subset of the numbers known as repdigits, which are numbers consisting of only r... |
[Question]
[
Given a positive integer n, randomly output n non negative integers that sum to one hundred. n will be at most 200. The output should be present as a list of integers (not sorted).
Your random sample should be uniformly sampled from all lists of n non negative integers that sum to one hundred.
Your cod... |
[Question]
[
There is a division-free algorithm for computing determinants [published by R.S.Bird in 2011](https://www.sciencedirect.com/science/article/abs/pii/S0020019011002353?via%3Dihub) that uses only matrix multiplications. Given a \$n×n\$ matrix \$X\$, the matrix \$Y=μ(X)\$ is another \$n×n\$ matrix which en... |
[Question]
[
A simple Markov Model will be used in this question. For more information about Markov Chains, see <http://setosa.io/ev/markov-chains/>.
Take a string. For this example, we will use the word:
```
reader
```
Now, for each character, take the characters that appear after each occurence of the character i... |
[Question]
[
We've had a [couple](https://codegolf.stackexchange.com/questions/60315/primes-of-ulams-spiral) of [challenges](https://codegolf.stackexchange.com/questions/4577/show-ulams-spiral) about the Ulam spiral. But that's not enough.
In this challenge we will plot a triangular Ulam spiral (as opposed to the u... |
[Question]
[
Based on the "binary, but with twos" notation mentioned in [this numberphile video](http://youtu.be/zv5M9zuZiXo?t=1m21s), write a function that takes a single number as input and outputs *all* variations of that number in a "binary" system where twos are allowed.
### Rules
* Code must only be a functio... |
[Question]
[
Write a program that takes two lines of input and uses the first as a key phrase to encrypt the second according to the Playfair encryption technique.
[Wikipedia describes Playfair encryption in some detail](http://en.wikipedia.org/wiki/Playfair_cipher), but to avoid any ambiguity, here's a brief summa... |
[Question]
[
Given the topography of land in ASCII picture format, figure out where lakes would go and fill them in. Assume an infinite amount of rain.
## example
**input**
```
#
##
# ####
# #########
## ###########
## ######... |
[Question]
[
## Task
Given a non-empty list of positive digits, group them into sublists of equal sum. You may output any subset of solutions with maximal number of sublists (equivalently, minimal sum).
The input may contain repeat elements. There may not exist any solution but the singleton list containing the inp... |
[Question]
[
*(Inspired by [this challenge](https://codegolf.stackexchange.com/q/102496/42963))*
Given two input strings, one of which is exactly one character longer than the other, arrange the strings into ASCII art as if they are two halves of a zipper that is only halfway zippered. The longer word forms the bot... |
[Question]
[
We don't have enough (semi-)easy challenges for beginners. More and more of the easy ones are already taken. So I tried to come up with something that might be achievable by beginners, but that isn't a duplicate.
### Input:
A single string separated with your OS new-line (i.e. `\r\n`),
or an array wi... |
[Question]
[
The problem is as follows.
**Input:** An integer `n`
**Output:** The smallest prime bigger than `n`.
The challenge is to give the fastest code possible to do this. I will test the code on values starting at size roughly `10^8` `10^200` and doubling in size until it takes more than one minute 10 secon... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win.
Closed 7 years ago.
[Improve this quest... |
[Question]
[
Given a positive integer `n`, do the following (and output every stage):
1. start with a list containing `n` copies of `n`.
2. do the following `n` times:
3. at the `i`th step, gradually decrement the `i`th entry of the list until it reaches `i`
So, for example, if the given `n` is `4`, then you start ... |
[Question]
[
Say I have a list such as `[3, 0, 4, 2, 1]`, and I use selection sort to sort it, I could visualize it like this:
```
3,0,4,2,1
|-|
0,3,4,2,1
|-----|
0,1,4,2,3
|-|
0,1,2,4,3
|-|
0,1,2,3,4
```
This challenge is about visualizing sorting like this.
## Input
Your input will be a list of positi... |
[Question]
[
In this challenge, you will write a program which outputs a program which is the **double** the length of the original program. The outputted program should output a new program a program double *its* length.
## Examples
If my program is `a`:
```
< a
> aa
< aa
> aaaa
< aaaa
> aaaaaaaa
```
## Rules
* No... |
[Question]
[
You should write a program or function which receives a string representing a chessboard with only pawns as input and outputs or returns whether any capture is possible on the board.
Input is in a [FEN](https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation)-like notation describing positions o... |
[Question]
[
Given an ordered list of numbers (possibly with leading zeros), arrange the numbers vertically, then let all zeros drop all the way to the bottom and all overhangs drop to the bottom-most open slot. Output the resulting integers, removing leading zeros.
### Worked Example
Say we were given the followin... |
[Question]
[
Your task: make a hexagonal triangle with side length `n`, where `n` is a positive whole number or 0.
First, let me define a hexagon:
```
/ \
| |
\ /
```
(Amazing ASCII art, right?)
Hexagons can be linked together by sharing sides:
```
/ \ / \
| | |
\ / \ /
/ \
| |
/ \ /
| |
\ /
... |
[Question]
[
In a chatroom with a few people, a topic came up between me and them about how many possible strings a regex could match.
Your task is to build a program that can answer that question.
Your program will accept, as input, any regular expression as defined in [this document](http://pubs.opengroup.org/onl... |
[Question]
[
A superpowerset (analogous to [superpermutation](https://en.wikipedia.org/wiki/Superpermutation)) on \$n\$ symbols is a string over the alphabet \$\{1,2,...,n\}\$ such that every subset of \$\{1,2,...,n\}\$ appears as a substring (in some order). For instance, `12342413` is a superpowerset on four symb... |
[Question]
[
In some parts of the world, phone numbers are fixed-length, apparently. That sounds boring, though.
For this challenge, your task is to take the digits of a what is presumed to be a valid phone number, and format it based on some simplified rules around what a phone number looks like.
### Input format
... |
[Question]
[
Create a program that outputs itself.
However, if the source code is repeated n times *(meaning to concatenate a copy of the source code to the end n-1 times)*, then there should be 1/n probability outputting the original source code, a 1/n probability of outputting the source code repeated twice, a 1... |
[Question]
[
## Introduction
You may know and love your normal unit circle. But mathematicans are crazy and thus they have abstracted the concept to any point that satisfies `x*x+y*y=1`. Because Cryptographers1 are also weird, they *love* finite fields and *sometimes* finite rings (it is not like they have much cho... |
[Question]
[
Create a basic calculator for Roman numerals.
### Requirements
* Supports `+`,`-`,`*`,`/`
* Input and output should expect only one subtractor prefix per symbol (i.e. 3 can't be `IIV` because there are two `I`'s before `V`)
* Handling of the subtraction principle in input and output must at minimum sup... |
[Question]
[
## Background
Numeric Mahjong is a hypothetical variation of Japanese Mahjong, played with nonnegative integers instead of Mahjong tiles. Given a list of nonnegative integers, it is a *winning hand* if it satisfies the following:
* its length is \$3n+2\$ for some nonnegative integer \$n\$, and
* it can... |
[Question]
[
Within the recesses of Unicode characters, there exists a Unicode block of (currently) 63 characters named "Number Forms", which consists of characters that have numerical values such as the roman numeral Ⅻ, vulgar fractions like ⅑ or ↉, or weird ones like ↊ (10) or ↈ (100000).
Your task is to write a ... |
[Question]
[
The purpose of the challenge is to approximately plot the [attractor](https://en.wikipedia.org/wiki/Attractor) of the [logistic map](https://en.wikipedia.org/wiki/Logistic_map) as a function of its parameter *r* (also called [bifurcation diagram](https://en.wikipedia.org/wiki/Bifurcation_diagram)), or ... |
[Question]
[
### Challenge
Given a colour raster image\* with the same width and height, output the image transformed under [*Arnold's cat map*](https://en.wikipedia.org/wiki/Arnold%27s_cat_map). (\*details see below)
### Definition
Given the size of the image `N` we assume that the coordinates of a pixel are given... |
[Question]
[
Your task is simple: write a program that will replace random pixels in a black 16px \* 8px rectangle (width by height) with a white pixel.
The holes must be uniformly random, and you should output the 16px by 8 px image with the white pixels inserted.
Replace only 1 pixel per column (16 total replace... |
[Question]
[
# Task description
Sometimes, you really need to fit something you’re writing in a small space. It may be tempting to drop the vowels and wrt lk ths – and failing that, who really needs spaces? Thssprfctlrdbl!†
Write a function or program that removes lowercase vowels `aeiou`, and then spaces, and then... |
[Question]
[
**Monday Mini-Golf:** A series of short [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") questions, posted (hopefully!) every Monday.
(Sorry I'm late again; I was away from my computer basically all of yesterday and today.)
Us programmers (especially the code-golfers) sure... |
[Question]
[
## Background
On a Rubik's cube there are 54 moves that you can execute, for example, turn the right face anti-clockwise, or rotate the top face and the horizontal slice twice. To notate any move, each face (or [slice](https://www.speedsolving.com/wiki/index.php/3x3x3_notation#Slice_Turns)) has a lette... |
[Question]
[
This challenge is based on a sandbox post by [user48538](https://codegolf.stackexchange.com/users/48538/user48538). Since he is no longer active on this site, I took over this challenge.
---
[apgsearch](http://www.conwaylife.com/wiki/Apgsearch), the distributed soup search program for Conway's Game of ... |
[Question]
[
# Background
In [Boggle](http://en.wikipedia.org/wiki/Boggle), a round is scored by adding up the points for each *unique* word a player has found (i.e. any word that more than one player has found is worth 0 points). The points are calculated based on the number of letters in each word, as follows:
3 ... |
[Question]
[
Your task is to create a random sequence of moves, which can be used to scramble a Rubik's Cube. Such a scramble is made up of exactly 25 moves. Each move consist of of the letters `UDRLFB` optionally followed by one of the suffixes `'2`.
This notation is called the Singmaster notation. `UDRLFB` repres... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic).
Closed 6 years ago.... |
[Question]
[
Below on the left is a picture of a sorting network that can sort 4 inputs. On the right you can see it sorting the input `3,2,4,1`.

A sorting network of size `n` consists of a set of `n` horizontal wires whe... |
[Question]
[
Here is [Minkowski's question mark function](https://en.wikipedia.org/wiki/Minkowski%27s_question-mark_function):
[](https://en.wikipedia.org/wiki/File:Minkowski_question_mark... |
[Question]
[
Programming is very rigid. You can't tell a program to "output the banana count", you have to tell it to `print(bananas)`.
But when you do that, you end up with a problem: you don't know how many bananas you have beforehand, so you don't know whether to use a plural.
Sometimes, programmers go the lazy ... |
[Question]
[
Sometimes, I have lists of constant matrices in my code:
```
[ [[1, 0],
[0, 1]],
[[1, 0],
[0,-1]],
[[0, 1],
[1, 0]],
[[0,-1],
[1, 0]] ]
```
That's a terrible use of screen real estate. I'd much rather write them next to each other:
```
[ [[1, 0], [[1, 0], [[0, 1], [[0... |
[Question]
[
I am a *very* casual code golfer, and don't often see posts until they show up in the "Hot Network Questions" sidebar over on StackOverflow. Usually, I'm late to the game, and since the only language I know is Python, there is little point in me answering as there are already several Python answers. Yo... |
[Question]
[
Input a String and surround it with a rounded rectangle of alternating "friendliness pellets".(`0`)
[Sandbox](https://codegolf.meta.stackexchange.com/a/19190/80214)
[](https://i.stack.imgur.com/iGnOL.jpg)
Idea originally from [Lyxal.](... |
[Question]
[
I asked [random.org](https://www.random.org/) for 128 random integers between 0 and 232 - 1. Since the random number generator was so eager to give the first 64 numbers first, they're obviously *more random* than the other 64.
Write a full program or function that returns a truthy result when one of th... |
[Question]
[
# Challenge
Given a positive integer `N` that is 28 or above, output a list of numbers summing to `N` that uses each digit `1` through `7` exactly once. You can give as a program or function.
The digits can appear by themselves or concatenated, as long as you use each of them once without repeats. For ... |
[Question]
[
[Subleq](https://esolangs.org/wiki/Subleq) is a Turing-complete esolang with only one instruction, SUBLEQ. This instruction takes in three parameters, `A`, `B`, and `C`, all of which are memory addresses. The instruction subtracts the value in memory address `A` from that in memory address `B`, storing... |
[Question]
[
## Background
A [**Young diagram**](https://en.wikipedia.org/wiki/Young_tableau#Diagrams) is a diagram that represents a nonincreasing sequence of positive integers using left-justified rows of squares. As an example, `5, 4, 1` is drawn as
```
OOOOO
OOOO
O
```
A Young diagram is said to be **symmetric*... |
[Question]
[
# Description :
Given a string as input, check if it is a valid ordinal number in English or not. If it is valid return truthy value otherwise return falsy value. (Suggested by @Arnauld. Thanks . Also by @JoKing)
For users who want to know about *ordinal numbers* go here :
<https://www.mathsisfun.com/n... |
[Question]
[
*Inspired by [Digits in their lanes](https://codegolf.stackexchange.com/questions/160409/digits-in-their-lanes) and [1, 2, Fizz, 4, Buzz](https://codegolf.stackexchange.com/questions/58615/1-2-fizz-4-buzz)*
# Introduction
Your task is to generate exactly the following output:
```
1
2
Fizz
4
Buzz
... |
[Question]
[
### Task
**Given a wrapper element and a non-jagged 3D array, wrap the array top, bottom, and all-around.** You must handle both character and numeric data, but the wrapper and the present will have the same data type.
---
### Character example
For character data, you may chose to handle either 3D arra... |
[Question]
[
Given the coordinates of several points on a plane, and the radius of a circle surrounding each point, draw polygons representing the circles and the edges where the circles meet. Straight edges will always fall along [circle-circle intersection](http://mathworld.wolfram.com/Circle-CircleIntersection.h... |
[Question]
[
## Background
Today (or Yesterday) is (or was) 11/23 or Fibonacci day! What better way to celebrate than to make a Fibonacci cake?
---
## Examples
```
3
ii
i_i_ii_i_i
```
</>
```
8
ii
ii
ii
ii ... |
[Question]
[
Write a program or function which, given a positive integer as input, outputs the representation of that integer in [Maya numerals](https://en.wikipedia.org/wiki/Maya_numerals).
# Maya numerals
Maya numerals is a [vigesimal](https://en.wikipedia.org/wiki/Vigesimal) system (base 20) using only 3 symbols... |
[Question]
[
### Background
The [move-to-front transform](https://en.wikipedia.org/wiki/Move-to-front_transform) (MTF) is a data encoding algorithm designed to improve the performance of entropy encoding techniques.
In the [bzip2 compression algorithm](http://en.wikipedia.org/wiki/Bzip2), it is applied after the [B... |
[Question]
[
The year is 930, and the Gregorian Church is having a problem. They have thousands of pages of chant music, but the problem is that all the sheet music was simply thrown onto a pile instead of having any real organisation system:
 input, you will output a truthy value if the input is a valid phone number. If it is not, output a falsey value. An input string is considered a valid phone num... |
[Question]
[
On a recent episode of [QI](http://en.wikipedia.org/wiki/QI), the first 5 multiples of 142857 were described as anagrams of the original number. Of course, anyone with more than a passing knowledge of that number will know that those numbers are actually cyclic, not just anagrams. But that got me think... |
[Question]
[
You are given a set of positive integers. You must arrange them into pairs such that:
* Each pair contains 2 numbers, one of which is a multiple of another. For example, 8 is a multiple of 4, and 9 is a multiple of 9.
* If the same number occurs many times in the initial set, it can be used that many t... |
[Question]
[
# Introduction
Write a complete program that rotates a rectangular block of ASCII characters 90 degrees clockwise. When the program itself is rotated 90 degrees clockwise, it rotates a block of ASCII characters 90 counterclockwise.
# Rules
* You many not use built-ins that rotate or transpose matrices.... |
[Question]
[
Stack Exchange currently has [134 question and answer sites](http://stackexchange.com/sites?view=list#traffic). This includes all beta sites (such as PPCG) but not [Area 51 proposals](http://area51.stackexchange.com/) nor any meta sites, except for the ["mother meta"](https://meta.stackexchange.com/).
... |
[Question]
[
Consider a randomized list of the integers 1 to N. You want to sort it using only the following actions:
1. **Swap** the first and last list elements. **(S)**
2. **Pop** off the first element and append it to the end of the list. **(P)**
This is always possible because any list can be sorted with enoug... |
[Question]
[
Output the flattened version of the sequence [A297359](http://oeis.org/A297359), which starts like the following:
```
1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 2, 4, 6, 4, 2, 1, 6, 10, 10, 6, 1,
1, 7, 16, 20, 16, 7, 1, 3, 8, 23, 36, 36, 23, 8, 3, 3, 11, 31, 59,
72, 59, 31, 11, 3, 1, 14, 42, 90, 131, 131, 90, 42, 1... |
[Question]
[
We've got quite a few national flag challenges already:
[AU](https://codegolf.stackexchange.com/questions/52667/print-the-australian-flag)
[CH](https://codegolf.stackexchange.com/questions/136927/draw-the-swiss-flag)
[FI](https://codegolf.stackexchange.com/questions/149842/happy-birthday-finland)
[FR](... |
[Question]
[
*For more information, watch [this video](https://www.youtube.com/watch?v=49KvZrioFB0), and go to [A276523](http://oeis.org/A276523) for a related sequence.*
The Mondrian Puzzle (for an integer `n`) is the following:
Fit non-congruent rectangles into a `n*n` square grid. What is the smallest difference... |
[Question]
[
This challenge is about building a chessboard in which the square size, instead of being constant across the board, follows a certain non-decreasing sequence, as described below.
The board is defined iteratively. A board of size \$n \times n\$ is enlarged to size \$(n+k)\times(n+k)\$ by extending it do... |
[Question]
[
**Task:** convert a HTML page into a mountain!
When HTML pages are indented, they can look like:
```
<div>
<div>
<div>
</div>
<div>
<div>
</div>
</div>
</div>
</div>
```
But to be honest, a mountain is more representative of this structure... |
[Question]
[
In physics, like electric charges repel, and unlike charges attract.
The potential energy between two unit charges separated by a distance `d` is `1/d` for like charges and `-1/d` for unlike charges. The potential energy of a system of charges is the sum of the potential energies between all pairs of c... |
[Question]
[
## Background
I have constructed a simple obstacle course by placing boxes in a rectangular room.
Now I want to count the number of essentially different ways in which it can be solved.
I need you to write me a program for that.
## Input
Your input is a non-empty rectangular array of the characters `.#... |
[Question]
[
In [this challenge](https://codegolf.stackexchange.com/q/139034/56656) we learned a way to encode every positive integer using factor trees.
Here is how it works:
* The empty string has value of 1.
* `(S)` where `S` is any expression with a value of **S** evaluates to the **S**th prime.
* `AB` where `A... |
[Question]
[
Write a full program with a source code of 256 bytes or less that looks at an image of a flag and determines what country that flag is from. A zip file containing the 196 different flags in the challenge can be downloaded from [here](http://flags.fmcdn.net/data/flags-normal.zip). Source: [[Flagpedia](h... |
[Question]
[
Your task is to give three different languages A, B, C, and write two different programs P and Q such that:
P is a quine in language A, but not a quine in B nor C;
Q is a quine in language B, but not a quine in A nor C; and
Q concatenated after P (without any new characters added in between) is a qu... |
[Question]
[
There are 21 items in [Minecraft](http://minecraft.gamepedia.com/Minecraft_Wiki) that you can [craft](http://minecraft.gamepedia.com/Crafting) using only [wood](http://minecraft.gamepedia.com/Wood) and items crafted from wood:
>
> [axe](http://minecraft.gamepedia.com/Axe)
>
> [boat](http://minecraf... |
[Question]
[
**Story**
Long time ago Bobby created a Bitcoin wallet with 1 Satoshi (1e-8 BTC, smallest currency unit) and forgot about it. Like many others he later though "Damn, if only I invested more back then...".
Not stopping at daydreaming, he dedicates all of his time and money to building a time machine... |
[Question]
[
When stacking books you usually want to put the largest ones at the bottom and the smallest ones at the top. However, my latent OCD makes me feel very uneasy if I've got two books where one is shorter (in height) but wider than the other. No matter which order I place them in, the top book will extend ... |
[Question]
[
# Background
[Boggle](https://en.wikipedia.org/wiki/Boggle) is a board game where the players have to find English words on a 4-by-4 board of random alphabets. Words can be constructed by selecting sequentially adjacent cells on the board. ("adjacent" means horizontally, vertically or diagonally adjace... |
[Question]
[
Consider an array of bits, say
```
1 1 1 0 0 0 0 1 0 0 1 0 1 1 1 1 1 0 1 0
```
We call a contiguous subarray of length ≥ 5 a **phase** if at least 85% of the bits are the same and the first/last bits are both equal to the majority bit. Furthermore, we call a phase **maximal** if it is not a strict suba... |
[Question]
[
Someone has been hastily stacking the Christmas presents, and it's quite a mess:
```
========================
| |
========================
=============
| |
| |
| |
| |
| ... |
[Question]
[
Aristotle's number puzzle is the challenge of populating each of 19 cells in a hexagonal grid with a unique integer between 1 and 19 such that the total along every axis is 38.
You can picture the game board looking like this:

And the puzzle, in es... |
[Question]
[
It seems as of recent, there have been a lot a Jimmys falling to their death, as can be seen [here](https://codegolf.stackexchange.com/questions/187586/will-jimmy-fall-off-his-platform), [and here](https://codegolf.stackexchange.com/questions/187682/how-many-jimmys-can-fit) where you were asked to dete... |
[Question]
[
Polystrips are a subset of polyominoes conforming to the following rules:
* each piece consist of 1 or more cells
* no cell can have more than two neighbours
* the cells should not enclose a hole
Free polyominoes are distinct when none is a rigid transformation (translation, rotation, reflection or gli... |
[Question]
[
*Inspired by [Bake a slice of Pi](https://codegolf.stackexchange.com/q/93615/42963)*
### Challenge
Given input `3 <= n <= 100` and `3 <= y <= n`, construct an `n x n` matrix of the decimal portion of `pi` (`14159...`), starting in the top left. Then, take the upper-right triangle of size `y x y` and co... |
[Question]
[
I got the following question at a test:
>
> Write a function `f` with the following type `a -> b -> (a -> b)`. `a` and `b` should not be bound in any sense, the shorter the code, the better.
>
>
>
I came up with `f a b = \x -> snd ([a,x],b)`. Can you find something tinier?
**Currently the winner is... |
[Question]
[
Jelly has [compressed string literals](https://github.com/DennisMitchell/jellylanguage/wiki/Syntax#string-literals), using the `“...»` delimiters. The way these work is by interpreting the `...` as a base-250 integer, \$n\$, then repeatedly divmod-ing this integer until it reaches \$0 \newcommand{\d}[2... |
[Question]
[
Your task is simple: Write a program (or function) that takes no input and outputs something like this:
```
## *name*, *length* bytes
*code*
```
Where `*name*` is the name of the language you are using, `*length*` is the number of bytes in your code, and `*code*` is your program's source code. If `... |
[Question]
[
**TLDR: This is the hexagonal version of [Is this square symmetrical?](https://codegolf.stackexchange.com/q/90214/9288)**
Given a hexagonal grid, decide if it is symmetric.
The shape of the grid is a regular hexagon. Each cell in the grid has two possible states.
Let's only consider reflections and rot... |
[Question]
[
You are provided with a non-empty array \$A\$ of integers, all greater than 0. But what good is an array if the elements do not sum up to the number \$N\$ (also provided as input)...
So to change that, you can pick any integer of your choice present in the array and replace any of its digits with a dif... |
[Question]
[
A [half-exponential function](https://en.wikipedia.org/wiki/Half-exponential_function) is one which when composed with itself gives an exponential function. For instance, if `f(f(x)) = 2^x`, then `f` would be a half-exponential function. In this challenge, you will compute a specific half-exponential f... |
[Question]
[
>
> This competition is over. Thanks for the interesting non-esolang entries, and congrats to [Jakuje](https://codegolf.stackexchange.com/a/57460/42963) for his winning JavaScript submission.
>
>
>
In the great tradition of ASCII Art Challenges on this site, here's another one. Given an input, draw... |
[Question]
[
Write a function/subroutine to sort a list of integers, [Tower of Hanoi](http://en.wikipedia.org/wiki/Tower_of_Hanoi) style.
You will be given a [stack](http://en.wikipedia.org/wiki/Stack_%28abstract_data_type%29) of integers. This is the main stack.
You are also given two more helper stacks. These he... |
Subsets and Splits
Python Q&A Count
Counts the number of questions and answers related to Python in the dataset, providing insight into the prevalence of Python content.