# All Questions

12,639 questions
Filter by
Sorted by
Tagged with
955 views

### How to golf a fork in Haskell?

I'm trying to make a pointfree function f that can act like APL's dyadic forks/Husk's §, so ...
2k views

### Custom Rows of Smileys Triangle

This problem is inspired from shinh's problem. Given an input of positive integer $n$, output a smiley triangle (see below) with $n$ rows. Detailed rules Can be either a function or a full ...
166 views

### Ordered, linear, affine, or relevant?

Background Supplementary reading 1, Supplementary reading 2 Linear lambda calculus is a limited form of lambda calculus, where every bound variable must be used exactly once. For example, ...
5k views

### What's my PIN number?

My PIN number is 1077, but that's too difficult to remember. I know from muscle memory that it's a digit, followed by a different digit, then followed by two of the same digit, which is different to ...
4k views

### Build me a room

Related A room, in the context of this challenge, is a multidimensional array where the elements on the "outside" are 1, to represent the walls, and all ...
262 views

### FreeCell stack moving

This question is about moving stacks around in the card game FreeCell, but here it will be presented more abstractly. Given three integers $0\le n,m<10000,0<k<10000$. There are $m+2$ ...
553 views

### Maximal hexagonal dot pattern

Challenge Imagine a hexagonal grid as shown below. Let's call such a grid has size $n$ if it has $n$ dots on one side. The following is one of size 3: ...
557 views

### Calculate the integer square root of a matrix

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 ...
252 views

### Flatten a parabola keeping the distances between points along the curve constant

Background Math SE's HNQ How to straighten a parabola? has 4,000+ views, ~60 up votes, 16 bookmarks and six answers so far and has a related companion HNQ in Mathematica SE How to straighten a curve? ...
2k views

### A quantum quine

Your challenge is to write a program that is a quine, meaning it prints out its own source code. For at least one individual character, when it is removed from the program's source, a single different ...
976 views

### How to ignore first user input in Python 3

I have 2 inputs: 1 single number and some numbers separated by whitespace: 1 1 2 3 4 5 I want to loop over the second input, and I don't need the first input. I ...
193 views

### Calculate the (n x "super")factorial [duplicate]

Introduction Factorials are one of the most frequently used examples to show how a programming language works. A factorial, denoted $n!$, is $1⋅2⋅3⋅…⋅(n-2)⋅(n-1)⋅n$. There is also the ...
1k views

### Enlarge ASCII art, Mark II

Related Given a piece of ascii art and a factor to enlarge it by, which will always be an odd number >1, replace each character with the corresponding ascii-art, resized to fit on a grid the size ...
215 views

2k views

### How many Sets are there?

This is similar in concept to this challenge, but that is pretty restrictive on input and output and I think opening up these restrictions would lead to a completely different set of solutions that ...
278 views

### Will Alice win in this Stick Bomber game?

Background Stick Bomber is a two-player game I just made up. Initially, some sticks are placed in one or more groups, and the sticks in each group are laid out in a straight line. So a configuration ...
498 views

1k views

### Compare positions of integers in this sequence

A001057 is one way to represent an integer as a natural number. It lists them according to the following pattern: 0, 1, -1, 2, -2, 3, -3, 4, -4, ... In this ...
299 views

Find the moves that bring a chess squad to a given destination. You control a chess squad consisting of a king and several other pieces, on a larger chess board. Your army is placed so that no piece ...
2k views

### Park, Lake, Santa Fe [closed]

Given a long multi-sentence string, the goal is the count the occurrences of the following words: park, lake, ...
192 views

### A Suitable Mission — The Professor's Revenge

Summer Klerance turned in her term assignment for this challenge. Her professor was miffed (but also amused) when he overheard a disgruntled classmate of Summer's saying she got her answers by ...
3k views

### Make an array of random 128 bit integers

Given an input value $n$, construct an array of $n$ random 128 bit (unsigned) integers. The integers should be uniformly random. Your code can use any in built random number generation function ...
1k views

### Index and return 3 characters

The challenge is simple: Read 3 letters from a system input¹ and convert them to numbers (A-1, B-2, C-3...Z-26)². Print each of those numbers in the order the ...
1k views

### Are you a probabilist or a physicist?

Hermite polynomials refer to two sequences of polynomials: The "probabilist's Hermite polynomials", given by $${He}_n(x) = (-1)^n e ^ \frac {x^2} 2 \frac {d^n} {dx^n} e ^ {-\frac {x^2} 2}$$ ...
821 views

### What if function application was right-associative?

Background In Haskell and many other functional languages, function application f(x) is simply written as f x. Also, this form ...
2k views

### King of the Hill: Nose Poker - An ogre game for ogres

Links Chat room The official game report Github repo - In case of bugs to report Here's the official score table: ...
716 views

### Sliding Dice in a Dish

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. ...
2k views

### Third Stirling numbers of the second kind

$\left\{ n \atop k \right\}$ or $S(n, k)$ is a way of referring to the Stirling numbers of the second kind, the number of ways to partition a set of $n$ items into $k$ non-empty subsets. For ...
315 views

### Hexagonal section numbers

Introduction Let's draw some regular hexagons formed by hexagonal tiles, marking the vertices of the tiles with dots. Then we will count the number of dots. ...
2k views

Background A 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 &... 7answers 441 views ### A Suitable Mission Summer Klerance, a senior in college, is what her teachers refer to as GBL*. Students in her probability class have been assigned individual problems to work on and turn in as part of their final ... 22answers 3k views ### Longest Zero Sum Sub-array Given an array of integers. Find out its longest sub-array (contiguous subsequence) whose sum is 0. The sub-array for output may be an empty array. Input Input an array of integers. Output Output the ... 7answers 2k views ### Happy Birthday... caird coinheringaahing? ChartZ Belatedly? When this question was posted, it was caird coinheringaahing's birthday! (source: 1, 2, 3, 4) (It was also World Emoji Day.) As a bit of some CGCC lore, caird's name came from a Jelly answer by Dennis ... 6answers 377 views ### Blinking Lighthouses – Founder's Day Upgrade To celebrate the island's next Founder's Day, colored filters (fuchsia, chartreuse, and aquamarine*) have been installed in every lighthouse. All lighthouses begin operation with their fuchsia filter,... 3answers 425 views ### Possible numbers on a broken screen A screen consisted of some LED segments like such: _ _ _ _ _ |_|_|..._|_|_| |_|_| _|_|_| However, some of the LEDs are broken, and it's possible that only ... 8answers 753 views ### Polyagony layout (mode 3/3,6) Background Polyagony is a family of hypothetical esolangs where the source code is laid out on a specifically shaped board before running it. It's similar to Hexagony, but various uniform tilings can ... 5answers 2k views ### KEYBOARD FOR MONKE! Flavortext So...this is awkward. It seems I accidentally turned into a monkey last night after eating one too many banana sundaes. This has made many things inconvenient, especially typing. You see, ... 42answers 2k views ### Which character to change (Robbers) Cops thread Robbers, your task is to crack a cops answer. Reveal the character that should be changed and what it should be changed to too. Please notify the cop if you cracked their challenge. The ... 44answers 3k views ### Which character to change (Cops) Robbers Thread Cops, your task is to chose a program that prints a string (you can choose). Although, if you change 1 character in your code, it should print another string. But there's a twist: You ... 3answers 150 views ### Is this an ordinal transform? [duplicate] Related: What's my telephone number? which asks to calculate the terms of A000085, the number of possible ordinal transforms of length n. Background Ordinal transform is a transformation on an integer ... 18answers 3k views ### It almost works (Robbers' Thread) Cops' Thread Your challenge is to find an uncracked, unsafe cop on the cops thread, and find an input value for which their code does not do as specified by the challenge. You must use values within ... 21answers 4k views ### It almost works (Cops' Thread) Robbers' Thread Your challenge is to find an existing challenge, and implement it in a way such that certain inputs fail. At least one input must not produce the correct output (use the other ... 0answers 52 views ### Simple Maze Generator [duplicate] Introduction Some time ago I found interesting one-liner for C64 and book (300 pages!) only about this programm 10 PRINT CHR(205.5+RND(1)); : GOTO 10 which ... 21answers 2k views ### Implement the Torian The Torian, $x!x$, of a non-negative integer $x$ can be recursively defined as$$ x!0 = x \\ x!n = \prod^x_{i=1} i!(n-1) = 1!(n-1) \times 2!(n-1) \times \cdots \times x!(n-1)  The Torian is then ...
The word "levencycle" is inspired by cyclic levenquine challenge. Definitions A 1-dup permutation of order $n$ is some permutation of $1, \cdots, n$ plus one duplicate number in the ...