Top new questions this week:
|
The pyramid begins with the row 1 1. We’ll call this row 1. For each subsequent row, start with the previous row and insert the current row number between every …
|
Background HQ0-9+-INCOMPUTABLE?! is a half-joke programming language introduced in Internet Problem Solving Contest 2011, Problem H. HQ9+ is an esoteric programming language specialized for certain …
|
There exists a bijection between the natural and rational numbers that works (approximately) like this: You create a 1-indexed 2-dimensional grid. In every field of this grid with position …
|
A Young diagram is a rectangular binary mask whose every row and every column are sorted in descending order. It is easy to check that every rectangular binary mask can be formed by xor-ing together a …
|
Background Boolean Algebra concerns representing values with letters and simplifying expressions. The following is a chart for the standard notation used: Above is what actual boolean algebra looks …
|
A near-repdigit number is a positive integer where all the digits are the same, except one. For example 101 and 227 are near-repdigits. A near-repdigit prime is a near-repdigit that is also prime. For …
|
Background For the purposes of this challenge, we’ll define a “perfect nontransitive set” to be a set \$A\$ with some irreflexive, antisymmetric relation \$<\$, such that for all \$a \in …
|
Greatest hits from previous weeks:
|
Challenge: In the programming language of your choice, shut down the machine that your code was executed on. Rules No shutting down by resource exhaustion (e.g.: forkbomb to force shutdown) You are …
|
We all know that if you google the word “google” it will break the internet. Your task is to create a function that accepts one string and returns its length, in the fewest possible Unicode …
|
Write the shortest code you can that produces an infinite output. That’s all. You code will only be disqualified if it stops producing output at some point. As always in code golf, the shortest code …
|
Introduction In our recent effort to collect catalogues of shortest solutions for standard programming exercises, here is PPCG’s first ever vanilla FizzBuzz challenge. If you wish to see other …
|
Your task is to display the letter “A” alone, without anything else, except any form of trailing newlines if you cannot avoid them, doing so in a program and/or snippet. Code that returns (instead of …
|
2048 is an incredibly fun and addictive game in which the goal is to create a tile with 2048 on it. Here’s a short description of the game: Pressing an arrow key will slide all the blocks in the …
|
In this challenge, you must take a string matching the regex ^[a-zA-Z]+$ or whatever is reasonable (you don’t have to consider uppercase or lowercase letters if you …
|