25
votes
15answers
820 views

prOGraMMIng PuZZleS & cOde ____

Input A non-empty encoded string consisting of printable ASCII characters (in the range 32-126), where some missing letters have been replaced with _. Output A decoded string of the same length ...
-2
votes
0answers
58 views

Hurricane Detector [on hold]

Input: Image via html5 drag & drop OR URL The image shows a satellite image of some part of the world with or without hurricanes. Output: Write / print / whatever: 'Hurricane detected' OR '...
10
votes
15answers
375 views

split and capitalize

Challenge : Given a string split at specific positions and capitalize the first character of the given word. Capitalize the first word's first char if and only if it was already capitalized Input : ...
19
votes
5answers
935 views

Golfing out the haters

The setup: A social network reports the number of votes a post has in two ways: the number of net upvotes (total upvotes - total downvotes), and the % of votes that were upvotes, rounded to the ...
-6
votes
1answer
111 views

Close my browser [on hold]

Create a program which closes my browser, no matter, what browser or version I'm using. Input: nothing Output: browser crash or close It should NOT: - crash the computer - freeze it Winner: since ...
2
votes
0answers
86 views

Golf a bit-reversal table [duplicate]

The Premise: You are writing a C driver for a screen for use on an embedded system. The screen uses a tortured version of SPI that requires data to be sent LSb (least-significant-bit) first, but MSB (...
10
votes
4answers
310 views

Generalized Gray codes

Input: An array I of k positive integers. The integers will be no larger than 100 and k ≤ 100. Output: Your code must output all possible arrays O of non-negative integers of length k with the ...
-3
votes
0answers
81 views

How to design a tree from an emmental cheese? [on hold]

TL;DR : code an algorithm that could transform an hierarchical display of a tree in an xlsx file into a tree data structure. The shortest code would win the challenge. If two code are as short the one ...
24
votes
30answers
2k views

Sign-Swapping Sums

Given a nonempty list of positive integers [X, Y, Z, ...], your job is to determine the number of unique values of ± X ± Y ± Z ... For example, consider the list [1, 2, 2]. There are eight possible ...
10
votes
12answers
432 views

The 21 Hairstyles of the Apocalypse

The 21 Hairstyles of the Apocalypse Given a a list of numbers between 1 and 21 (or 0 and 20) output a "stitched together" drawing of the following faces (see rules for stitching information): ...
22
votes
10answers
2k views

Find arsonist's lullaby

Imagine an arsonist walking around the town and picking its victims according to a very specific pattern (Or, alternatively, Imagine a bee flying around the garden and picking its flowers to pollenize ...
9
votes
1answer
172 views

What's the shortest way to define an anonymous recursive function in Octave?

I love functional programming in Octave, but it's rather unwieldy in practice. I'm wondering about the shortest way to define an anonymous recursive function. I have some ideas, but I'm wondering if ...
20
votes
9answers
3k views

Take CR and LF literally

As a celebration of good old Notepad, we are going to treat carriage returns and line feeds as what they originally meant, rather than what they are (ab-)used for today. Given a string consisting of ...
26
votes
21answers
3k views

The Time Anagram

Originally posted (and deleted) by @Tlink, which was most likely inspired from this StackOverflow question. Since it was a shame it got deleted, because it seemed like a good challenge in general, I ...
16
votes
10answers
2k views

Assign Airliner Seats

Inspired by last week's APL lesson. Given an uppercase 2D seat map and a 1D list of customers, return the seat map and the customer list but modified as follows (to indicate occupied seats and seated ...

15 30 50 per page