Linked Questions

54
votes
37answers
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 ...
37
votes
44answers
7k views

Kolmogorov shifter

Output or display the following three lines of text, exactly as they are shown below. A trailing newline is accepted. ...
45
votes
43answers
4k views

Split string on first occurrence of each character

Related. Given a printable ASCII string, split it into a list of non-empty strings with a new sub-string beginning every time a character, which has not previously been seen in the same case, occurs. ...
39
votes
41answers
8k views

I done did made a spaceship maw!

Introduction: Inspired by this comment of @MagicOctopusUrn on @Emigna's 05AB1E answer for my "It was just a bug" challenge: 8F9ÝÀNð×ý}».∊ I done did made a ...
32
votes
47answers
5k views

Print all lexicographically increasing numbers under 10000

A lexicographically increasing number is an integer whose digits are in strictly increasing order. Print all lexicographically increasing numbers under 10000. Here are lines of the expected output: ...
23
votes
61answers
6k views

Reinvent the For loop [closed]

For loops are used extensively in many languages, but what would you do if no languages supported them? Create a way to execute a basic ...
37
votes
39answers
8k views

Tips for golfing in PHP

What general tips do you have for golfing in PHP? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to PHP (e.g. "remove comments" is not ...
33
votes
41answers
5k views

Half, Half Half, and, Half

Consider the following number sequence: \$ 0, \frac{1}{2}, \frac{1}{4}, \frac{3}{4}, \frac{1}{8}, \frac{3}{8}, \frac{5}{8}, \frac{7}{8}, \frac{1}{16}, \frac{3}{16}, \frac{5}{16}, \frac{7}{16}, \...
34
votes
42answers
3k views

Up and down, up and down

Challenge: Given a positive integer input n, create a vector that follows this pattern: 0 1 0 -1 -2 -1 0 1 2 3 2 1 0 -1 -2 -3 -4 -3 -2 -1 ... ±(n-1) ±n ...
46
votes
27answers
2k views

Divisor skyline

For any positive integer k, let d(k) denote the number of divisors of k. For example, ...
41
votes
30answers
7k views

There, I fixed it (with tape)

Challenge: Given a string only containing upper- and/or lowercase letters (whichever you prefer), put tape horizontally to fix it. We do this by checking the ...
15
votes
59answers
4k views

Round towards zero

This is a simple task. Given a positive or negative real number, round it to the next whole integer closer to zero. The challenge Take input through any reasonable form (stdin, function, etc.) of ...
40
votes
27answers
3k views

Difference should make no difference

Your company lately hired a new bunch of extremely dedicated sysadmins. They feel that just watching computer screens is quite limiting (I mean, 60Hz refresh rate is just NOT enough), so they hooked ...
11
votes
57answers
2k views

Print multiplication tables by input

In this challenge you've to print multiplication tables by input, Here are some examples: ...
25
votes
35answers
4k views

It's time for a clock challenge!

I'd like you to build me a clock that displays time in this format: 18 ---------- 19 -------------------------------------------------- This displays '18:10'. ...

15 30 50 per page
1
2
3 4 5
7