Linked Questions

111
votes
224answers
25k views

Fibonacci function or sequence

The Fibonacci sequence is a sequence of numbers, where every number in the sequence is the sum of the two numbers preceding it. The first two numbers in the sequence are both 1. Here are the first ...
157
votes
146answers
52k views

Don't google “google”

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 ...
106
votes
93answers
15k views

Loading… Forever

Your challenge is to make an infinite loading screen, that looks like this: Or, to be more specific: Take no input. Output Loading..., with a trailing space, but ...
152
votes
57answers
21k views

How high can you count?

Challenge: Your task is to write as many programs / functions / snippets as you can, where each one outputs / prints / returns an integer. The first program must output the integer ...
79
votes
35answers
8k views

Tips for golfing in <all languages>

The aim of this post is to gather all the golfing tips that can be easily applied to <all languages> rather than a specific one. Only post answers that its ...
94
votes
52answers
13k views

Make a “Ceeeeeeee” program

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, ...
71
votes
40answers
7k views

Happy Birthday V!

Thanks to @KritixiLithos for helping me out with this challenge! V is a programming language that I wrote so that I could use and extend vim for code-golf challenges. The very first commit was on ...
57
votes
54answers
7k views

Lossy Sorting (Implement Dropsort)

Dropsort, designed by David Morgan-Mar, is an example of a linear-time "sorting algorithm" that produces a list that is, in fact, sorted, but contains only some of the original elements. Any element ...
51
votes
40answers
2k views

Appending String Lengths

Challenge: Given a string s on the characters a-z, A-<...
47
votes
37answers
10k views

Facey McFaceface

Anyone remember Boaty? You could totally make any old word, right? Write a function to turn a string into Somethingy McSomethingface. It should accept one string as input. Ignore the case of the ...
43
votes
37answers
4k views

Extendify the ASCII Sun

Write a program that takes in (via STDIN/command line) a non-negative integer N. When N is 0, your program should print O (that's capital Oh, not zero). When N is ...
35
votes
46answers
5k views

Generate Monday Numbers

Monday numbers, as defined by Gamow in this question over on Puzzling, are positive integers N with the following three properties: The decimal representation of N does not contain the digit 0 The ...
5
votes
74answers
9k views

Shortest code to print ':)' random times [duplicate]

You have to create a code which prints :) a random number of times from 1 to 255 inclusive. Your output may not contain any whitespace. Your score : The ...
37
votes
33answers
4k views

Output the qwerty keyboard

Given a character, output (to the screen) the entire qwerty keyboard layout (with spaces and newlines) that follows the character. The examples make it clear. Input 1 ...
44
votes
25answers
3k views

Sever-sort an array

Challenge Given a non-empty array of integers, e.g.: [5, 2, 7, 6, 4, 1, 3] First sever it into arrays where no item is larger than the previous (i.e. non-...

15 30 50 per page