text stringlengths 180 608k |
|---|
[Question]
[
In today's episode of AAOD, we are going to construct a Chinese Shrine of varying heights.
Consider the following examples for height (`N`) `1` to `6`
`N = 1`:
```
.
|
. ]#[ .
\_______/
. ]###[ .
\__]#.-.#[__/
|___| |___|
|___|_|___|
####/_\####
|___|
/_____... |
[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 7 years ago.... |
[Question]
[
Write a program that generates a winning sequence of moves to the deterministic variant of the game 2048. The sequence should be in the form of a string of numbers 0-3, with 0: up, 1: right, 2: down, 3: left.
For example, the string "1132" means right right left down. The winning program is the shortes... |
[Question]
[
The Hamming distance between two strings of *equal* length is the number of positions at which the corresponding characters are different. If the strings are not of equal length, the Hamming distance is not defined.
### Challenge
Write a program or function that finds the largest Hamming distance from... |
[Question]
[
In this challenge you will be asked to implement any function (or full program) that fulfills two properties. Those properties are:
* Your function must be an injective (reversible) function from the polynomials with non-negative integer coeffecients to the non-negative integers. This means no two uneq... |
[Question]
[
**Task:** Given the area of a triangle, find a [Heronian triangle](https://en.wikipedia.org/wiki/Heronian_triangle) with that area. Any Heronian triangle with the specified area is allowed.
A Heronian triangle is a triangle with **integer sides and integer area**. By Heron's formula, a triangle with si... |
[Question]
[
How well do you know the site? Let's find out.
This is a [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") challenge. [Cop's thread](https://codegolf.stackexchange.com/questions/100357/ppcg-jeopardy-cops).
As a robber, you need to:
1. Find a non-deleted, ... |
[Question]
[
The first [Letters, Get Moving!](https://codegolf.stackexchange.com/questions/66556/letters-get-moving) was very popular, but had limited participation. This one will be easier to solve, but hopefully involve some tricks in golfing.
You are given a string of only lowercase letters. For each letter, wit... |
[Question]
[
**Challenge**: write a single script file `foo.cmd` which can be invoked from the vanilla Windows `cmd.exe` prompt (not PowerShell, not in administrator mode), to execute arbitrary Windows-specific code...
```
> .\foo.cmd
Hello Windows!
```
...but also be invoked unaltered from a typical POSIX-complia... |
[Question]
[
# The Interview: The Front Nine
*This is the first of a series of challenges inspired by programming job interview questions.*
You walk into the office where your potential future boss sits. "Come on in and sit down", he says. You nervously sit down, making sure your snappy yet professional attire is f... |
[Question]
[
Finding a treasure hidden by pirates is really easy. Everything you need for this is a map. It is widely known that pirates draw maps by hand and describe the algorithm to find a place in the following way: "Stand near a lone palm tree, do 30 steps towards the forest, 15 towards the lake, ..."
A journe... |
[Question]
[
Your job is to create the longest period [iterating quine](https://esolangs.org/wiki/Iterating_quine), where the length of each program in the sequence is bounded by 500 bytes.
That is, if you repeat the following steps:
1. Start with your initial program
2. Run the current program
3. Go back to step 2... |
[Question]
[
# Challenge
You are given two distinct bit strings of the same length. (For example, `000` and `111`.) Your goal is to find a path from one to the other such that:
* At each step, you change only one bit (you can go from `000` to any of `001`, `010`, `100`).
* You cannot visit the same bit string twice... |
[Question]
[
Write a piece of JavaScript code that calls `alert` with an array containing the first 50 Fibonacci numbers in order. You may only use the following characters: `+!()[]`.
As a reference, your code must be functionally equal to the following:
```
var fib = [], a = 1, b = 1;
for (var _ = 0; _ < 50; _++) ... |
[Question]
[
Write a program that takes in a string where every line consists of the character `0` indented by some number of spaces. The top line is not indented and every other line will be indented by at most one more space than the line just before it.
No lines will have trailing spaces but you may optionally a... |
[Question]
[
## Plot contrivance
You wake up to find that something has gone horribly wrong! Your time machine has malfunctioned and you are lost sometime between June 2022 and October 1991.
You check the computer that you keep on the desk to see what time it is, but alas the positron interference from your quantum... |
[Question]
[
Let \$A\$ be a square matrix that is at least \$2 \times 2\$ where each element is an integer. \$A^2 = A \times A\$ will then have the same dimensions as \$A\$, and will have integer elements. For example, let
$$A = \left[ \begin{matrix}
-3 & 2 \\
0 & -1
\end{matrix} \right]$$
Therefore,
$$\begin{alig... |
[Question]
[
In the body of this challenge, \$\begin{pmatrix}n\\k\end{pmatrix}\$ is used to represent the [number of combinations](https://en.wikipedia.org/wiki/Combination) of \$k\$ elements of \$n\$, also written as \$\frac{n!}{k!(n-k)!}\$ or \$n\mathrm{C}r\$.
Any nonnegative integer \$m\$, for arbitrary natural ... |
[Question]
[
**Introduction**
On 30 May 2020, NASA and SpaceX launched a crewed rocket to the international space station on the [SpaceX Demo 2](https://en.wikipedia.org/wiki/Crew_Dragon_Demo-2) mission. This is the first time humans have been launched into orbit from American soil since the retiring of the [Space ... |
[Question]
[
Interleaved sequences represent an arbitrary merging of some number of sequences.
An interleaved sequence can be made by appending elements to a list one by one from some number of lists, choosing the next element from some list each time. Therefore, an interleaved sequence will contain exactly the sam... |
[Question]
[
# Background
[Stack Cats](https://github.com/m-ender/stackcats) is a reversible esoteric language made by Martin Ender. Each command in Stack Cats is either the inverse of itself (represented as a symmetric character, such as `-_:T|`), or has its inverse command (represented as the mirror image, such a... |
[Question]
[
A permutation of size **n** is a reordering of the first **n** positive integers. (meaning each integer appears once and exactly once). Permutations can be treated like functions that change the order of a list of items of size **n**. For example
```
(4 1 2 3) ["a", "b", "c", "d"] = ["d", "a", "b", "c"... |
[Question]
[
# The beautiful pattern drawer
Good morning PPCG !
The other day, when I was trying to help someone on Stack Overflow, a part of his problem gave me an idea for this challenge.
First of all, check the following shape :
[](https://i.sta... |
[Question]
[
# Task
Define a *mod-fold* as a function of the form **f(x) = x % a1 % a2 % … % ak**, where the **ai** are positive integers and **k ≥ 0**. (Here, **%** is the left-associative modulo operator.)
Given a list of **n** integers **y0, …, yn−1**, determine if there exists a mod-fold **f** so that each **yi... |
[Question]
[
A pangram is a sentence or excerpt which contains all twenty-six letters of the alphabet, as is demonstrated in [this code golf challenge](https://codegolf.stackexchange.com/questions/66197/is-it-a-pangram). However, [a pangrammatic *window*](https://en.wikipedia.org/wiki/Pangrammatic_window) is a pang... |
[Question]
[
The determinant of a 2 by 2 matrix
```
a b
c d
```
is given by `ad - bc`.
Given a matrix of digits with dimensions 2n by 2n, n ≥ 1, output the result obtained by recursively computing the determinant of each 2 by 2 sub-block until we reach a single number.
For example, given the input
```
3 1 4 1
5 9 2... |
[Question]
[
Given an input of any valid [Glypho](http://esolangs.org/wiki/Glypho) program,
output its "human-readable" counterpart.
Glypho is an interesting esolang idea:
>
> The instruction reference is given here. For each instruction, the characters
> abcd represent the symbols composing each instruction. a r... |
[Question]
[
### New Bonus! (See below)
The cartography team of U.S. Republican presidential hopeful Ben Carson is having some trouble with their maps (image via [Washington Post](https://www.washingtonpost.com/news/wonk/wp/2015/11/18/ben-carsons-campaign-made-a-u-s-map-and-put-a-bunch-of-states-in-the-wrong-place/... |
[Question]
[
Joe lives at the Bahamas. It is winter. His children are disappointed that there is no snow. Joe needs to make snow for his children. Fortunately, he has a 3-d printer. He plans to make snowflakes with it. Unfortunately he has no idea how a snowflake would look like. In fact, he has never seen a snowfl... |
[Question]
[
I was playing with the Fibonacci sequence in binary like so (note that the binary representations are written here from smallest bit to largest bit):
```
1 1
1 1
01 2
11 3
101 5
0001... |
[Question]
[
[Toki pona](https://en.wikipedia.org/wiki/Toki_Pona) is a minimalist constructed language, and thus it has minimalist phonotactics (rules describing what sounds make valid words).
Toki Pona has 8 consonant sounds `m`, `n`, `p`, `t`, `k`, `s`, `w`, `l` and `j` and 5 vowel sounds `a`, `e`, `i`, `o`, `u`.... |
[Question]
[
It's election time, and your job is to beat your competitor in a head-on rivalry! You are both trying to win over a city of 256 people in a 16x16 grid. Right now, the city hasn't been divided into voting regions yet, but that's where your gerrymandering skills come in! You can also campaign in arbitrar... |
[Question]
[
[Pip](https://github.com/dloscutoff/pip) is an imperative golfing language with infix operators. It also borrows some features from functional and array programming.
What general tips do you have for golfing in Pip? I'm looking for approaches and tricks that are commonly useful for code golf and are sp... |
[Question]
[
Normal brackets (`()`,`[]`,`<>` and `{}`) are nice and unambiguous, however someone thought it would be a good idea to use non bracket characters as brackets. These characters, `|` and `"`, are ambiguous. For example does
```
""""
```
correspond to
```
(())
```
or
```
()()
```
It is impossible to tell.... |
[Question]
[
In this challenge, **you are given a limited amount of information about a particular game of chess, and you need to predict who won the game**.
You are given two sets of data:
1. Piece counts (What pieces are still alive)
2. Board colors (The color of pieces on the board)
More importantly, **you *don'... |
[Question]
[
I came up with this challenge independently, but it turns out to be the inverse to [this challenge by Doorknob](https://codegolf.stackexchange.com/q/21927/8478). As I really like his spec, I decided to steal large parts of it instead of cooking up my own explanations.
## The Challenge
Given the abbrevi... |
[Question]
[
Inspired by [Fibonacci domino tiling](https://codegolf.stackexchange.com/questions/37886/fibonacci-domino-tiling), this problem is about generating ASCII art representing another famous combinatorial sequence.
A *n-step mountain diagram* is a drawing of a mountain range, using exactly *n* '/' and *n* '... |
[Question]
[
# The Challenge
Create an **terminating** expression in [SKI Combinator Calculus](https://en.wikipedia.org/wiki/SKI_combinator_calculus) in less than 200 combinators (S, K, I) that reduces to the expression with the most combinators.
There will be no limit on how many parenthesis/applications can be us... |
[Question]
[
Write a program or function that estimates the Shannon entropy of a given string.
If a string has *n* characters, *d* **distinct** characters, *xi* is the *i* th distinct character, and *P(xi)* is the probability of that character occuring in the string, then our Shannon entropy estimate for that strin... |
[Question]
[
Take a look at the sevens multiplication table from 7×0 to 7×9:
```
0, 7, 14, 21, 28, 35, 42, 49, 56, 63
```
If we just look at the digits in the one's place we get a permutation of the digits 0 through 9:
```
0, 7, 4, 1, 8, 5, 2, 9, 6, 3
```
Consider taking some positive decimal integer N and replacin... |
[Question]
[
Consider this nested array
`[[1,2,4],[1,2,3],[2,3]]`
In each subarray in which 1 appears, a 2 appears. You might say that 1's presence is dependent on 2's presence.
The converse is not true, as 2 appears in a subarray without 1.
Additionally, 3 is dependent on 2, and 4 is dependent on 1 and 2.
## Task
... |
[Question]
[
Jimmy has had a busy last week with all [these](https://codegolf.stackexchange.com/questions/187586/will-jimmy-fall-off-his-platform) [platforms](https://codegolf.stackexchange.com/questions/187682/how-many-jimmys-can-fit) [and](https://codegolf.stackexchange.com/questions/187731/jimmy-needs-your-help)... |
[Question]
[
Write a program or function that takes in a nonempty list of integers in any reasonable convenient format such as `4, 0, -1, -6, 2` or `[4 0 -1 -6 2]`.
Print or return a string that depicts the list as an ASCII art forest where each number becomes a tree of proportional height. Each tree takes up four ... |
[Question]
[
# Recursive Binary Description
Recently, I made my very first contribution to OEIS by extending and adding a b-file to sequence [A049064](https://oeis.org/A049064). The sequence starts with `0`, and then the next values are derived from giving a "binary description" of the last item.
For example, the ... |
[Question]
[
When working on [Non-Palindromic Polyglot Boggle](https://codegolf.stackexchange.com/q/51124/8478), I found it quite tedious to pack the codes as efficiently as possible onto the Boggle board, even with only two strings. But we're programmers, right? We know how to automate things.
Given a list of stri... |
[Question]
[
Given two rectangles, which are possibly not in the orthogonal direction, find the area of their intersection.
[](https://i.stack.imgur.com/CmqsU.png)
## Input
You may take the rectangles as input in one of the following ways:
* The co... |
[Question]
[
This [code-challenge](/questions/tagged/code-challenge "show questions tagged 'code-challenge'") is based on OEIS sequence [A261865](https://oeis.org/A261865).
>
> \$A261865(n)\$ is the least integer \$k\$ such that some multiple of \$\sqrt{k}\$ is in the interval \$(n,n+1)\$.
>
>
>
The goal of thi... |
[Question]
[
Inspired by [Make a Rectangle from a Triangle](https://codegolf.stackexchange.com/q/203135/78410).
## Task
There is a famous formula on the sum of first \$n\$ squares:
$$
1^2 + 2^2 + \dots + n^2 = \frac{n(n+1)(2n+1)}{6}
$$
It is known that this number is composite for any \$n \ge 3\$.
Now, imagine a co... |
[Question]
[
Let's say you have some text, and you want it to send it to your friend, but you don't want anyone else to read it. That probably means you want to encrypt it so that only you and your friend can read it. But, there is a problem: you and your friend forgot to agree on an encryption method, so if you se... |
[Question]
[
*Tangentially inspired by the opening to the What-If book.*
The input is a rectangle of spaces as a string, list of string, etc., with objects made of `#`'s inside:
```
########
# #
########
### ####
### ####
###
```
The objects wil... |
[Question]
[
# Nuggets of Code
It's a hypothetical situation where it is Friday evening, and you've invited over the usual golfing buddies to participate in your favourite hobby: code golfing. However, as this is such a brain-draining task, you need to pick up some brain food for the group so you can golf as much a... |
[Question]
[
Task: Have your program randomly choose one of the following two quotes at runtime and print that one quote, exactly as shown.
1:
```
Under the spreading chestnut tree
I sold you and you sold me.
There lie they, and here lie we
Under the spreading chestnut tree.
```
2:
```
WAR IS PEACE.
FREEDOM IS SLAV... |
[Question]
[
The challenge is to create the classic Snake game using as few bytes as possible.
Here are the requirements:
* The game must be implemented in a typical 2-dimensional layout. The snake should be able to grow significantly within the bounds of the map (this really means, don't make your map too small, u... |
[Question]
[
We have 3 dice in a square dish. The dish is 8 units wide and tall and each die is 3 units wide and tall. The dice are facing up each with a different number on their top face.
```
111..222
111..222
111..222
........
........
333.....
333.....
333.....
```
Then we play a game. At each step we can slide... |
[Question]
[
A quote from [MO.SE answer](https://mathoverflow.net/a/357249):
>
> Although it is well known that Conway was able to quickly calculate the day of the week of any given date, it is less well known that one part of the algorithm is easy to remember and useful in practice: In any given year, the followi... |
[Question]
[
[Life-like cellular automaton](https://en.wikipedia.org/wiki/Life-like_cellular_automaton) are cellular automaton that are similar to Conway's Game of Life, in that they operate on a (theoretically) infinitely large square grid, where each cell has exactly 8 neighbours, and is one of 2 states, namely a... |
[Question]
[
This is going to be relatively challenging code-golf challenge.
**Input:** Any URL, must have the protocol attached, e.g. <http://codegolf.stackexchange.com> (which will be our test case)
**Output:** A generated QR Code that represents this URL, which, when scanned by a smart device will take you to th... |
[Question]
[
**Challenge**
The goal of this challenge is to make a function that takes an input string, a start keyword and a end keyword. The output extracted result is from (but excluded) the given start keyword to (but excluded) end keyword. The output sub-string follows the rules as below.
* In all cases, the l... |
[Question]
[
### Background
The [Burrows–Wheeler transform](http://en.wikipedia.org/wiki/Burrows%E2%80%93Wheeler_transform) (BWT) is a reversible permutation of the characters of a string that results in large runs of similar characters for certain types of strings such as plain text. It is used, for example, in th... |
[Question]
[
Almost the polar opposite if [this](https://codegolf.stackexchange.com/questions/17907/convert-a-repeated-decimal-to-a-fraction) challenge, and I suspect it will be slightly easier.
Your task is to take two integers in the format `a/b` (Forming a rational number) then output the number in decimal exact... |
[Question]
[
Write a program, that determines whether the multiplication table of the given finite magma represents a group.
A magma is a set with a binary operation that is closed, that means
* for all \$a,b\$ in \$G\$, \$a\*b\$ is again in \$G\$ (Closedness)
Let \$(G, \* )\$ be a magma. \$(G, \* )\$ is a group if... |
[Question]
[
(Based on [this Math.SE problem](https://math.stackexchange.com/questions/472908/given-a-desired-coloring-scheme-for-a-stick-how-can-i-brush-it-with-the-fewest), which also provides some graphics)
I have a stick which looks kinda like this:
.
Exampl... |
[Question]
[
# Game of Game of Life
[Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life "Conway's Game of Life") is a 0-player game. But that's okay! We can make it a multi-player game.
This game is played on the smallest square grid that will accommodate a 6x6 square for each player (12x1... |
[Question]
[
How can we depict a turned shape simply and nicely using ascii characters in 3D space?
I suggest this method :
Instead of a circle we use a square rotated by 45° for the cutting section so that we only need '/' and '\' characters to draw it.
```
/\
/ \
\ /
\/
```
And we use '\_' character for the... |
[Question]
[
**What is a Prime Square?**
A Prime Square is a square where all four edges are different prime numbers.
But which ones?
And how do we construct them?
**Here is an example of a 4x4 Prime Square**
```
1009
0 0
3 0
1021
```
First we start from the upper left corner. We are working **clockwise**.
... |
[Question]
[
We define \$V(x)\$ as the list of distinct powers of \$2\$ that sum to \$x\$. For instance, \$V(35)=[32,2,1]\$.
By convention, powers are sorted here from highest to lowest. But it does not affect the logic of the challenge, nor the expected solutions.
## Task
Given a [semiprime](https://en.wikipedia.o... |
[Question]
[
Implement this [recurrence relation](https://en.m.wikipedia.org/wiki/Recurrence_relation) as a function or program that inputs and outputs a non-negative integer:
* F(0) = 0
* F(N) = the smallest integer greater than F(N-1) such that the sum and/or product of its base-10 digits is N
N is your program's... |
[Question]
[
Last week, [we worked to create the shortest 1-D string using the top 10,000 words in the English language](https://codegolf.stackexchange.com/questions/87311/compounding-english). Now, lets try the same challenge in 2D!
What you need to do is to take all of the above words, and put them in a rectangle... |
[Question]
[
In Canada, the penny is no longer circulated. Cash payments are rounded to the nearest 5 cents.
Money can be saved by splitting purchases. For example, two $1.02 items cost $2.04 which rounds up to $2.05, but when buying the items in separate purchases, each price rounds to $1.00 for a total of $2.00. ... |
[Question]
[
Your program should compute the number of moves it takes a [chess knight](http://en.wikipedia.org/wiki/Knight_%28chess%29) to reach each square of the chess board. The input will be two space-separated integers representing coordinates of the starting square (horizontal then vertical coordinate, 0-7 in... |
[Question]
[
## Problem
A fact you may have noticed about factorials is that as \$n\$ gets larger \$n!\$ will have an increasing number of \$0\$s at the end of it's base \$10\$ representation. In fact this is true for any base.
In this challenge you will be given a base \$b > 1\$ and an integer \$n > 0\$ and you wi... |
[Question]
[
I'm trying to make a pointfree function `f` that can act like APL's dyadic forks/Husk's `§`, so `f g h i a b` equals `g (h a) (i b)`, where `g` is a binary function, `h` and `i` are unary functions, and `a` and `b` are integers (I'm only dealing with integers and not other types right now). I converted... |
[Question]
[
let `S`, `a` and `b` each represent a string
Goal: Write a standard string replace function where the you replace all occurrences of `a` in a string `S` with `b` so long as `a` is not already part of an instance of `b`
for example, if we have the string `S` = `My oh my that there is a big ol' that`
and... |
[Question]
[
The idea for this [code-challenge](/questions/tagged/code-challenge "show questions tagged 'code-challenge'") is simple: given a matrix of integers, let's sort it by applying Rubik-style movements. This means that you can select a single row or column and rotate its elements in any direction:
```
[1, 3... |
[Question]
[
## Block shuffle sort
The *block shuffle sort* is a (rather artificial) method of sorting a list.
It works as follows, illustrated by an example.
```
[6, 1, 0, 3, 2, 4, -2, -1]
Break list into contiguous blocks
[6][1, 0][3, 2, 4][-2, -1]
Sort each... |
[Question]
[
Given a directed graph, output the longest cycle.
## Rules
* Any reasonable input format is allowed (e.g. list of edges, connectivity matrix).
* The labels are not important, so you may impose any restrictions on the labels that you need and/or desire, so long as they do not contain additional informat... |
[Question]
[
The [Biham-Middleton-Levine traffic model](https://en.wikipedia.org/wiki/Biham%E2%80%93Middleton%E2%80%93Levine_traffic_model) is a self-organizing cellular automaton that models simplified traffic.
>
> It consists of a number of cars represented by points on a lattice with a random starting position... |
[Question]
[
The largest forum on the web, called postcount++ decided to make a new forum game. In this game, the goal is to post the word, but the word has to have one letter added, removed, or changed. Your boss wanted you to write a program which gets the word, and the UNIX dictionary, as you work for company wh... |
[Question]
[
The goal is to create a fully compliant converter between the official Unicode encodings as given in the [UTF FAQ](http://www.unicode.org/faq/utf_bom.html). Given that this is centred on Unicode, I will accept the answer with the lowest byte count using the best possible of the involved encodings (whic... |
[Question]
[
My boss needs to know how long it takes to add together two integers. But, I don't like to work weekends, and I think its fair that my code doesn't either. The problem is, the boss is a demanding guy and thinks I should put in over time to make sure the time it takes stays the same, and I know he is go... |
[Question]
[
I was interested in seeing the answers to [this (now defunct) question](https://codegolf.stackexchange.com/q/4842/3862), but it has never been corrected/improved.
Given a set of 6-sided [Boggle](http://en.wikipedia.org/wiki/Boggle#Rules) dice (configuration stolen from [this question](https://codegolf.... |
[Question]
[
There is a well-known bijection between the permutations of \$n\$ elements and the numbers \$0\$ to \$n!-1\$ such that the lexicographic ordering of the permutations and the corresponding numbers is the same. For example, with \$n=3\$:
```
0 <-> (0, 1, 2)
1 <-> (0, 2, 1)
2 <-> (1, 0, 2)
3 <-> (1, 2, 0)... |
[Question]
[
Given two positive numbers \$x\$ and \$n\$ with \$x<2^n\$, write the shortest possible function to compute \$x^{-1} \mod 2^n\$. In other words, find \$y\$ such that \$xy=1 \mod 2^n\$.
Your function must complete in a reasonable time for at least \$n=64\$, so exhaustive search will not work.
If the inve... |
[Question]
[
The [TAK function](https://mathworld.wolfram.com/TAKFunction.html) is defined as follows for integers \$x\$, \$y\$, \$z\$:
$$
t(x, y, z) = \begin{cases}
y, & \text{if $x \le y$} \\
t(t(x-1,y,z), t(y-1,z,x), t(z-1,x,y)), & \text{otherwise}
\end{cases}
$$
Since it can be proved that it always terminates ... |
[Question]
[
## Background
[Tetris Grand Master 3](https://harddrop.com/wiki/TGM3) has a hidden grading system based on the shape of the stack at the end of the game, which is called [**Secret ">" Stacking Challenge**](https://harddrop.com/wiki/Tetromino_art#Greater_than). It consists of entirely filling the lowest... |
[Question]
[
The previous neural net golfing challenges ([this](https://codegolf.stackexchange.com/questions/183036/can-a-neural-network-recognize-primes) and [that](https://codegolf.stackexchange.com/questions/187562/machine-learning-golf-multiplication)) inspired me to pose a new challenge:
## The challenge
Find ... |
[Question]
[
*Inspired by [We do tower hopping](https://codegolf.stackexchange.com/questions/156497/we-do-tower-hopping) and related to [2D Maze Minus 1D](https://codegolf.stackexchange.com/questions/105621/2d-maze-minus-1d)*
# Introduction
Your task is to find the shortest path to get out of an array maze followin... |
[Question]
[
Multiplication between 2 integers can be reduced into a series of addition like so
```
3 * 5 = 3 + 3 + 3 + 3 + 3 = 5 + 5 + 5
```
Exponentiation (raising **a** to the power **b**) can also be reduced into a series of multiplications:
```
5 ^ 3 = 5 * 5 * 5
```
Therefore, exponentiation can be reduced int... |
[Question]
[
## Balanced bases:
Balanced bases are essentially the same as normal bases, except that digits can be positive or negative, while in normal bases digits can only be positive.
From here on, balanced bases of base `b` may be represented as `balb` - so balanced base 4 = `bal4`.
In this challenge's definit... |
[Question]
[
A bit of background:
When I first learned about Brainf\*ck, one of the first things I did was to write a Java application that would take in a string and create a, somewhat, optimized program to print said string.
Recently, I've been playing around with [Piet](http://www.dangermouse.net/esoteric/piet.h... |
[Question]
[
You are a project manager. One day, one of your programmers went insane (*not your fault*) and took all the expressions in the codebase and added random brackets to them, before quitting on the spot, ranting about your incompetence (*also not your fault*). This would be an easy fix, however, for some r... |
[Question]
[
The zombie apocalypse has come, and the world is coming to an end. Suddenly, someone discovers a formula that takes the current hour, minute, and day, and spits out the perfect note to play on a piano that instantly kills every zombie that hears it. Unfortunately, there is only one piano player left in... |
[Question]
[
Your task is to check the volume of water in a pool. Your have to create a program that takes in a input that is represented by an `10 by 10` grid of integers, with heights ranging from `A=1` to `Z=26` from the latin alphabet. Find the volume of water each pool can hold.
You have to output the volume o... |
[Question]
[
Let us define a sequence. We will say that \$a(n)\$ is the smallest number, \$x\$, that has the following properties:
* \$x\$ and \$n\$ are co-prime (they share no factor)
* \$x\$ does not appear earlier in the sequence
* \$|n - x| > 1\$
Unlike most sequences the domain and range of our sequence are th... |
[Question]
[
*Inpsired by a [youtube video](https://www.youtube.com/watch?v=-Wxui-9b8cw) from a fellow PPCG user...*
You challenge is to use ASCII-art draw a Minecraft castle wall of Andesite and Diorite. The *shape* of the wall is the [Cantor Set](https://en.wikipedia.org/wiki/Cantor_set). For reference, the Canto... |
[Question]
[
Given an input of a list of numbers in the format of a shorthand increasing
integer sequence, output the sequence in full.
Shorthand increasing integer sequence format works by finding every number *n*
with fewer digits than the number preceding it, *m*. With *d* as the number of
digits in *n*, the las... |
[Question]
[
# Count the number of sides on a polygon
The polygon-side-counting robot has decided to travel the world without telling anyone before, but it is crucial that the process of polygon counting is not stopped for too long. So you have following task: Given a black and white image of a polygon, your progra... |
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.