Programming Puzzles & Code Golf newsletter

Top new questions this week:

Draw with your CPU

I have come across an article where students used network traffic to draw their university on the country's IPv6 graph. [image] Your goal is simple to tell, but hard to implement. Draw the text MAIL …

code-golf  
asked by bebe 137 votes
answered by squeamish ossifrage 90 votes

American Gothic in the palette of Mona Lisa: Rearrange the pixels

You are given two true color images, the Source and the Palette. They do not necessarily have the same dimensions but it is guaranteed that their areas are the same, i.e. they have the same number of …

popularity-contest image-processing  
asked by Calvin's Hobbies 101 votes
answered by Quincunx 51 votes

Has my milk expired?

Aww, man, this expiry date doesn't write the months with letters! I can't tell if it's expiring on March 10th or October 3rd... Wait, no, never mind, the year says 2012. (alley-oops half-used brick of …

code-golf date  
asked by algorithmshark 70 votes
answered by Ventero 12 votes

Good Versus Evil

Illustrated by Chris Rainbolt, my brother and a fresh graduate from Savannah College of Art and Design Introduction The angels and demons are fighting and, as usual, using earth as their …

king-of-the-hill pattern-matching  
asked by Rusher 43 votes
answered by m.buettner 16 votes

Write a Rectangular Program that Outputs the Number of Times it was Rotated

The title says it all. Your goal is to write a program that forms a w×h rectangle of characters that can be rotated and re-run to output the number of 90° Counter-Clockwise (CCW) rotations that have …

code-golf  
asked by Calvin's Hobbies 29 votes
answered by Quincunx 20 votes

Loop without 'looping'

A question similar to this has been asked a couple of years ago, but this one is even trickier. The challenge is simple. Write a program (in your language of choice) that repeatedly executes code …

popularity-contest restricted-source  
asked by CailinP 23 votes
answered by histocrat 65 votes

Golfing ASCII-art

Let's try to golf this piece of ascii-art representing a golfing man: '\ . . |>18>> \ . ' . | …

code-golf ascii-art kolmogorov-complexity  
asked by xem 23 votes
answered by Dennis 10 votes

Greatest hits from previous weeks:

Create a memory leak, without any fork bombs

Your task is to create a memory leak. This is a program that uses loads of memory, until the computer runs out and has to do some swapping to save itself from running out. The only way that the memory …

popularity-contest  
asked by George H 43 votes
answered by Andrew Medico 58 votes

Most creative way to reverse a positive integer

Provided an input as an unsigned integer: 13457 Your function/subroutine should return: 75431 Since this is a popularity contest, be creative. Constraints: You cannot use arrays. You cannot …

popularity-contest  
asked by duci9y 39 votes
answered by Jonathan Van Matre 42 votes

Can you answer these?

Compact coding of integer into bitstring

I want to compactly code positive integers x into bits, in a manner allowing decoding back into the original integers for a stateless decoder knowing the maximum value m of each x; it shall be …

code-golf  
asked by fgrieu 5 votes

Probability to win a hand of poker (Texas hold 'em)

Challenge: In the last stage of a two players Texas hold 'em, given a two-card hand and five cards on table, determine your probability to win versus an opponent by the standard ranking of poker …

code-golf  
asked by Cœur 3 votes
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3