Programming Puzzles & Code Golf newsletter

Top new questions this week:

Convert to and from the factorial number system

The Factorial Number System, also called factoradic, is a mixed radix numeral system. The factorials determine the place value of a number. In this system, the right most digit can be either 0 or 1, …

code-golf number  
asked by Volatility 10 votes
answered by beary605 6 votes

Number of holes in a polygon

The Problem: Count the number of holes in a connected polygon. Connectivity of the polygon is guaranteed by the condition that every triangle in the input triangulation shares at least 1 side with …

code-golf geometry  
asked by Kaya 8 votes
answered by WolframH 4 votes

quine-ish tic-tac-toe

Write a program in your chosen language which plays a perfect game of tic-tac-toe on a 3 * 3 board against a human player. However, every move has to be a different program, generated from the …

code-golf  
asked by vsz 7 votes

Evaluate the primorial of a number

The primorial of a number is the product of all the primes till that number, itself included. Input a number from STDIN and evaluate its primorial. Don't use libraries. Shortest code wins.

code-golf arithmetic  
asked by Soham Chowdhury 2 votes
answered by Howard 1 vote

Generate Pascal's Pyramid

Pascal's Pyramid is an extension of Pascal's Triangle to the third dimension. Starting with a 1 as the apex, the elements of each successive layer can be determined by summing the three numbers that …

code-golf math  
asked by Volatility 2 votes
answered by Manishearth 1 vote

Evaluate the binomial theorem!

Your mission, even if you don't accept it, is to input three numbers from STDIN or file: 5 0.5 6 What you must do is evaluate this: (5a + 0.5b)^6 This basically means that the first two …

code-golf math  
asked by Soham Chowdhury 2 votes
answered by Kirilenko 0 votes

Greatest hits from previous weeks:

Fibonacci function or sequence

Write the shortest code that either: Generates a Fibonacci sequence (either in standard output, or as a stream) Calculates, given n, the nth Fibonacci number (I gave both options in case one is …

code-golf fibonacci  
asked by Chris Jester-Young 24 votes
answered by jtjacques 19 votes

The alphabet in programming languages

Our task is to, for each letter of the (English) alphabet, write a program that prints the alphabet, in a language whose name starts with that letter. Input: none Output: abcdefghijklmnopqrstuvwxyz …

code-golf  
asked by Joey Adams 24 votes
answered by Jesse Millikan 6 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