Linked Questions

40
votes
40answers
5k 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 ...
46
votes
30answers
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-...
46
votes
24answers
4k views

The sea in your terminal

Background Summer is well over in the Northern Hemisphere, and a lot of us miss the sun, the beaches, the waves of the ocean... This challenge aims at cheering them up by reminding them of the sea. ...
26
votes
38answers
4k views

Is my name official?

Introduction As ToonAlfrink says: "Me thinks there aren't enough easy questions on here that beginners can attempt!". So the task is very simple. Given a string, output a truthy or falsy value ...
37
votes
25answers
3k views

Length-terminated sequences

We all know the age-old debate - should strings be length-prefixed or should they be null-terminated? Well, you've run into a blob of binary data and apparently whoever made it decided that the best ...
61
votes
15answers
12k views

I HATE spaces in file names

It is simple. I cannot stand when people use spaces when naming files. It sometimes wrecks console commands and makes the output of ls ugly. The challenge is to write a program (only ascii characters)...
16
votes
47answers
4k views

ASCII Meme Arrow Generator

Specifications Given a number n, output an ASCII "meme arrow" (greater-than symbol, >) of size ...
21
votes
33answers
2k views

Output "Fit" numbers

"Fit Numbers" Sam has a "brilliant" idea for compression! Can you help? Here is a rundown of Sam's compression scheme. First take in a base 10 representation of any natural number strictly smaller ...
26
votes
24answers
2k views

Antisymmetry of a Matrix

A matrix is antisymmetric, or skew-symmetric, if its transpose equals its negative. The transpose of a matrix can be obtained by reflecting its elements across the main diagonal. Examples of ...
54
votes
8answers
10k views

Golf a number bigger than TREE(3)

The function TREE(k) gives the length of the longest sequence of trees T1, T2, ... where each vertex is labelled with one of k colours, the tree Ti has at most i vertices, and no tree is a minor of ...
4
votes
37answers
4k views

"cat"-like program [duplicate]

The mission is to implement a cat-like program (copy all STDIN to STDOUT). Rules: You may only use standard libraries Indentation must be either two spaces or a ...
16
votes
23answers
2k views

Create an Accurate How-To Article

Here is an easy-intermediate challenge for anyone interested! What is that? A thing me and brother do a bit too often is this: One of us has a problem and asks the other to explain how to do certain ...
28
votes
16answers
2k views

Illustrate the square of a binomial

Given (by any means) two different natural numbers (of any reasonable size), output (by any means) the square of their sum as in the examples below: Given 4 and 3, output: ...
24
votes
23answers
3k views

Find the closest three-digit hex colour

In CSS, colours can be specified by a "hex triplet" - a three byte (six digit) hexadecimal number where each byte represents the red, green, or blue components of the colour. For instance, ...
13
votes
28answers
4k views

Cook me a hot dog! [closed]

Sometimes I find myself wanting a hot dog (don't we all) and so I make one. Now to make a hot dog, it is very simple. 1) Put the hot dogs into boiling water 2) Wait for a certain amount of time (...

15 30 50 per page