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 126 votes
answered by squeamish ossifrage 80 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

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 41 votes
answered by bitpwner 23 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 36 votes
answered by Rusher 12 votes

Check if point lies inside triangle

Your goal is to determine whether a given 2D point X lies within the area of the triangle with given vertices A,B,C. Write a function that takes in the coordinates of the test point X and the three …

code-golf geometry  
asked by xnor 27 votes
answered by Abraham 16 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

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 22 votes
answered by Ventero 17 votes

Greatest hits from previous weeks:

Fibonacci Sequence Generator

Can you create a clever or unexpected Fibonacci generator? Your code must print or return either the nth Fibonacci number or the first n Fibonacci numbers.

popularity-contest fibonacci  
asked by SLaks 148 votes
answered by Juliet 116 votes

Shortest program that throws StackOverflow Error

Write a program that throws a StackOverflow Error or the equivalent in the language used. For example, in java, the program should throw java.lang.StackOverflowError. You are not allowed to define a …

code-golf  
asked by True Soft 36 votes
answered by TwiNight 59 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 4 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 1 vote
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