9
votes
11answers
544 views

Generate a cipher

Generate a cipher given a number and string Your task is simple. Given a string s and a number 0 <= n <= 9 as inputs, insert a pseudo-random printable ASCII character between each character of ...
7
votes
1answer
361 views

I want to watch you die of thirst

You are a traveller crossing the desert between two towns. You cannot carry enough water to get across without stopping. This is a variation of a classic puzzle. The Rules A desert looks like this: ...
7
votes
1answer
194 views

Prove 2+2=2*2 (and similar)

Output a full formal poof of such statements such as 1+2=3, 2+2=2*(1+1) etc. Introuction If you know Peano Arithmetic you can probably skip this section. Here's how we define the Natural Numbers: (...
10
votes
2answers
400 views

Match the permutations!

Your challenge is to create a regex that matches every string permutation of itself, and nothing else. The match must also be case-sensitive. So, for example, if your regex is: ABC It should match (...
8
votes
0answers
85 views

Fewest disk writes to defrag multiple files

Introduction A disk is a linear container with blocks indexed 0 through size-1. A file is a named list of block indexes used by that file. An example filesystem is expressed like this: 15 ALPHA=3,...
27
votes
17answers
2k views

Cracking in progress

Remember those brute-force programs to crack password that show every combination they are trying? More precisely, at one point, the n first characters are fixed (they have been guessed successfully), ...
2
votes
4answers
258 views

8 ought to become Infinity [on hold]

Let's take a look on a typical loop, which usually performs 8 iterations: for (int x=0; x<8; ++x); You have to make it infinite! It's a popularity-contest for all languages that support such ...
12
votes
8answers
619 views

Determine if a relation is transitive

Challenge description Let's start with some definitions: a relation is a set of ordered pairs of elements (in this challenge, we'll be using integers) For instance, [(1, 2), (5, 1), (-9, 12), (0, 0)...
7
votes
1answer
234 views

Handling errors

What's great about golfing is not having to deal with errors. Except this time you won't get off so lightly! I need to do some arithmetic with certain limitations, and I wan't to know what goes wrong ...
8
votes
3answers
222 views

Convert CSV to Table

The Challenge Given a CSV input, output a proper unicode table using box characters. Formatting The table will be formatted using the following rules: Column width will be equal to the longest ...
9
votes
14answers
2k views

Generate /* line number comments */

Your task is to write a program (or function) that will take a string as input and append text to the beginning of every line that satisfy the following rules: The text appended must contain the line ...
5
votes
0answers
159 views

The Most Durable Pokemon Types

Background In Pokemon there are 18 types: Normal Fighting Flying Poison Ground Rock Bug Ghost Steel Fire Water Grass Electric Psychic Ice Dragon Dark Fairy ...
0
votes
0answers
101 views

The Almost-Eternity Code [on hold]

Write a program that outputs as many characters as possible, with two conditions: The program must be 256 bytes or shorter The program must almost surely eventually halt. In other words, the only ...
17
votes
6answers
638 views

Distance Between Two Points Travelling on a Polar Graph Chart

Brief Problem Explanation Write a program to find the minimum distance between two points travelling only on rays emanating from the origin, and circles centered on the origin Explanation of Premise ...
14
votes
11answers
614 views

Draw a Dragon Curve

You task for today: draw a dragon curve! In case you don't know what a Dragon Curve is, here is an introductory ViHart video (Really cool, please watch!) Your task: draw a dragon curve, iterated at ...

15 30 50 per page