**8.068 code-golf questions.**

After inputting a string [length 1-20], only containing the chars y for yes and n for no,
your program should output the result (y or n). Example input: yynynynny would output y.
The result is ...

Duolingo, the language learning app, has a lot of things going for it, but there is one major issue that drives me crazy. It tells me how many days in a row I've used the app with a message like You'...

Problem
Let's define a generalized Cantor set by iteratively deleting some rational length segments from the middle of all intervals that haven't yet been deleted, starting from a single continuous ...

Create a program that outputs itself.
However, if the source code is repeated n times (by concatenating a copy of the source code to the end n times), then there should be 1/n probability outputting ...

Description :
Given a string of space separated binary digits or space separated booleans or an array of binary digits or array of booleans . Your job is to find the xor of each until you end up with ...

Introduction
I have recently started playing clickerheroes again. In the recent patch they introduced a new mechanic to mercenaries: their lifetime. Instead of having a random chance at dying now ...

The 9 Billion Names of God is a short story by Arthur C. Clarke. It's about a group of Tibetan monks whose order is devoted to writing down all the possible names of God, written in their own alphabet....

According to this XKCD comic, there is a formula to determine whether or not the age gap in a relationship is "creepy". This formula is defined as:
(Age/2) + 7
being the minimum age of people you ...

Challenge
Create a function or program that, when given an integer size, does the following:
If size is equal to 1, output
H H
HHH
H H
If size is greater than 1, output
X X
XXX
X X
where X is ...

Today's challenge is to draw a binary tree as beautiful ascii-art like this example:
/\
/ \
/ \
...

Once I wrote a JavaScript program that would take as input a string and a character and would remove all characters except for the first one and the character given as input, one by one.
For example, ...

Do you recognize the PPCG logo?
it looks like this, when you do an ascii art of it.
+---+
|PCG|
+---+
v
Now, In this Code Golf, You will make a code, that makes logos for other sites, similar to ...

The goal of this code golf is to convert integers to English words.
The program prompts for input. If this input isn't an integer, print NaN. If it is an integer, convert it to English words and ...

When writing a message with fridge magnets, you'll often find yourself substituting a 1 for an I. In this challenge, your goal is to find out if a message can be written using the letters of another ...

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

My dog is called Rex. Every time I scold him, he seems not very impressed and the only times I see him react is when I pronounce his name. If I say
Rex, I told you not to do this! You're making me ...

MATL is a golfing language created by Luis Mendo. MATL has proven to be highly competitive, often beating submissions in other golfing languages such as Pyth, CJam and Jelly.
What are some useful ...

Overview
Given a list of digits, find the fewest operations to make 100
Input
A string of digits, which may or may not be in numerical order. The order of the digits cannot be changed, however plus ...

Challenge inspiration was this that I saw somewhere:
The word "nun" is just the letter n doing a cartwheel
Your challenge is to take a string and determine if it is the first letter doing a ...

Everybody loves geometry. So why don't we try and code golf it? This challenge involves taking in letters and numbers and making shapes depending on it.
The Input
The input will be in the form of (...

The Task
Given a natural number as input, your task is to output a truthy or falsey value based on whether the input is a factorial of any natural number. You can assume that the input number will ...

Your task is to write a program or function which:
When run for the first time, outputs its source code.
On subsequent executions, it should output what it output previously, but with one random ...

Given an integer matrix a and a nonnegative integer i, output a mapping b that maps the distinct values in the ith column of a to rows of a who have that value in the ith column.
You may assume that ...

I was inspired by a graphic of the longest interrupted lines on a pixel art site:
(image credit to JadeX#1046 on Discord)
Challenge
For this challenge, you must take an input image and get the ...

Background
The Royal Netherlands Meteorological Institute defines a heat wave* as a series of at least 5 consecutive days of ≥25°C weather (“summery weather”), such that at least 3 of ...

I am a robot. I bought this keyboard because of its easy rectangular layout:
~` !1 @2 #3 $4 %5 ^6 &7 *8 (9 )0 _- +=
tab Qq Ww Ee Rr Tt Yy Uu Ii Oo Pp {...

The Challenge
It's quite simple really, sort a list of numbers.
Details
You must sort a list of numbers in ascending order, without using any built-in sorting functions/libraries/etc (i.e. list....

You're organizing a treasure hunt for your friends. To conduct things more easily, you want to draw a map of all locations where you hid the precious objects.
Input
Any form of input denoting a list ...

This challenge is related to some of the MATL language's features, as part of the May 2018 Language of the Month event. Associated challenge: Function clipboard: copy.
Introduction
MATL's function ...

So... uh... this is a bit embarrassing. But we don't have a plain "Hello, World!" challenge yet (despite having 35 variants tagged with hello-world, and counting). While this is not the most ...

Input: Two decimal integers. These can be given to the code in standard input, as arguments to the program or function, or as a list.
Output: Their product, as a decimal integer. For example, the ...

At runtime, keep prompting for a line of input until the user input is not the name of an existing file or directory or other file system item, relative to the current working directory. Then return/...

Write a program that will merge any valid programs from two proper languages of your choice, into a polyglot.
You can assume both programs compile.
You can't assume the input is golfed, so if you ...

This is the Collatz Conjecture (OEIS A006577):
Start with an integer n > 1.
Repeat the following steps:
If n is even, divide it by 2.
If n is odd, multiply it by 3 and add 1.
It is proven that ...

Challenge
Given an integer n ≥ 4, output a permutation of the integers [0, n-1] with the property that no two consecutive integers (integers with absolute difference 1) are next to each other.
...

You are probably familiar with the Fibonacci sequence where the first two terms are 0, 1 (or sometimes 1, 1) and every term after that is the sum of the previous two. It starts like this:
0, 1, 1, 2, ...

A while ago, I had a look at the prime factorization of 27000:
27000 = 23 × 33 × 53
There are two special things about that:
consecutive-prime: The primes are consecutive: 2 is the ...

In this task, you have to write a program, that computes the prime factors of a number. The input is a natural number 1 < n < 2^32. The output is a list of the prime factors of the number in the ...

Using your language of choice, golf a quine.
A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output.
No cheating -- that means ...

You will take a set of input numbers, and output the minimum and maximum of the set. You can either write two programs, with 1 program doing each function, or one combined program.
Here's an example ...

Edit
I have posted a 250 lines reference implementation for review at CR, discussing the major class of the code. Download the complete Visual Studio 2013, .NET 4.5 source code (10 kB) from my server....

Your task is to write a program or a function that outputs n random numbers from interval [0,1] with fixed sum s.
Input
n, n≥1, number of random numbers to generate
s, s>=0, s<=n, sum of ...

Create the shortest program or function that finds the factorial of a non-negative.
The factorial, represented with ! is defined as such
In plain English the factorial of 0 is 1 and the factorial of ...

I find it fascinating how the letters "H" and "I" are very similar. "H" is a horizontal stroke surrounded by two vertical strokes; "I" is a vertical stroke surrounded by two horizontal strokes (...

The Challenge
Write a complete program that writes twice as many bytes to standard output as the length of the program.
Rules
The program must write ASCII characters to the standard output.
The ...

Given a unique, sorted list of integers, create a balanced binary-search tree represented as an array without using recursion.
For example:
func( [1,2,3,5,8,13,21] ) => [5,2,13,1,3,8,21]
Before ...

I decided to learn J so that I could better take part in code golfing. Starting it off relatively simple, I tried writing a solution to this problem:
Find the sum of all the multiples of 3 or 5 ...

I like Tetris a lot, but I'm not very good at it. Just once I'd like to see that spaceship take off in front of my own eyes! And since computers are oh-so great at everything, the only possible ...

Many old Game Boy games often required string input from the user. However, there was no keyboard. This was handled by presenting the user with a "keyboard screen" like so:
The 'character pointer' ...

- string
- math
- ascii-art
- number
- sequence
- kolmogorov-complexity
- arithmetic
- array-manipulation
- decision-problem
- number-theory
- geometry
- tips
- graphical-output
- primes
- random
- integer
- grid
- date
- combinatorics
- game
- quine
- restricted-source
- parsing
- binary
- matrix

- Can this helicopter/wrecking ball combo remain airborne?
- What word describes "the top of a person's head"?
- Can only one particle exist at a defined point in spacetime?
- A brief int counter
- Print code-fenced sections of a Markdown document
- Does an identical cryptographic hash or checksum for two files mean they are identical?
- Switching Colors In Graph
- Circular, or missing, definition in set theory?
- Application process has been in German (native tongue), should I inform the candidate that the interview will be held in English?
- How did the general population of England convert so smoothly to Protestantism?
- Expand glob with flag inserted before each filename
- Why is the regularization term *added* to the cost function (instead of multiplied etc.)?
- Should players be allowed to be more effective in combat through more specific attack choices
- Minimizing a symmetric sum of fractions without calculus
- How to ask coworker to go slower so I can learn how to do it
- Regex to detect if all alphabetic characters are upper case
- Readability of form input fields and confirmation
- How to know you've outgrown your equipment?
- Magento 2: Plugin not working on \Magento\Swatches\Block\LayeredNavigation\RenderLayered
- Why are there only four fundamental interactions of nature?
- Where are escape sequences needed when using tilde ~ operator in awk?
- Sizing of a chapter and how many should I use?
- Why are unit tests failing seen as bad?
- How to typeset appropriate "does not entail" symbol?