Linked Questions

201
votes
318answers
42k views

Golf you a quine for great good!

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 ...
192
votes
56answers
16k views

No A, just CAPS LOCK

What happens when the CapsLock key on your keyboard doesn't have a notch in it? "This hPPENS." The goal of this program is to consistently emulate keyboard misses where each A press is replaced with ...
75
votes
82answers
10k views

Count of “a”s and “b”s must be equal. Did you get it computer?

In the popular (and essential) computer science book, An Introduction to Formal Languages and Automata by Peter Linz, the following formal language is frequently stated: mainly because this language ...
82
votes
67answers
21k views

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Hold up..... this isn't trolling. Background These days on YouTube, comment sections are littered with such patterns: ...
61
votes
105answers
9k views

Make a ;# interpreter

I recently created a new language called ;# (pronounced "Semicolon Hash") which only has two commands: ; add one to the ...
66
votes
58answers
15k views

Sing Baby Shark

"Baby Shark" is a children's song about a family of sharks. Having long been popular as a campfire song, it has been popularized since the mid-2000s by social media, online video and radio. - ...
33
votes
74answers
3k views

Remove character at specified index

(heavily inspired by Element of string at specified index) Given a string s and an integer n representing an index in ...
43
votes
45answers
7k views

ETAOIN SHRDLU golf

Short and sweet description of the challenge: Based off ETAOIN SHRDLU, your challenge is to write the shortest program or function in any language that outputs the 26 letters of the English alphabet ...
34
votes
64answers
5k views

P Pr Pre Pref Prefi Prefix Prefixe Prefixes

Given some finite list, return a list of all its prefixes, including an empty list, in ascending order of their length. (Basically implementing the Haskell function ...
43
votes
41answers
4k views

Bit run rundown

Given an integer n > 0, output the length of the longest contiguous sequence of 0 or 1 in ...
52
votes
39answers
6k views

The forbidden built-in

In the standard loopholes, the following is forbidden: Claiming that your answer is written in "MyOwnLanguage", where the command x means "read a sequence of ...
32
votes
50answers
4k views

The first n numbers without consecutive equal binary digits

The sequence contains the decimal representation of the binary numbers of the form: 10101..., where the n-th term has n bits. The sequence is probably easiest to ...
39
votes
49answers
4k views

Find the first duplicated element

Given an array a that contains only numbers in the range from 1 to a.length, find the first duplicate number for which the second occurrence has the minimal index. In other words, if there are more ...
31
votes
50answers
4k views

Simulating Exploding Dice

Your task is to make a program that takes in an integer n > 1, and outputs the roll of a single n-sided die. However, this ...
52
votes
32answers
6k views

Make some Alphabet Rain

Alphabet Rain The Task: The basic premise is to print out the input string and then repeat each character vertically, based on it's (0-indexed) position in the (case-insensitive) alphabet ...

15 30 50 per page