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 5 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 3 votes

Find real roots of a polynomial

Write a self-contained program which when given a polynomial and a bound will find all real roots of that polynomial to an absolute error not exceeding the bound. Constraints I know that Mathematica …

code-golf math polynomials  
asked by Peter Taylor 7 votes

ASCII-visualize a graph

Your mission, should you choose to accept it, is to input a series of point pairs that form a graph, like this: A,B C,A B,A A,D A,E F,G C,G You must then output an ASCII visualization of the …

code-golf ascii-art graphical-output  
asked by Soham Chowdhury 5 votes
answered by WolframH 3 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:

Advanced Code Golf - Write a small HTTP server

Your challenge is to write a code-golf HTTP server that accepts GET requests. It obviously doesn't have to be fully featured, but it must serve files from a directory. Rules: The HTTP server must …

code-golf advanced  
asked by Polynomial 24 votes
answered by Howard 9 votes

Print this diamond

This question has been spreading like a virus in my office. There are quite a variety of approaches: Print the following: 1 121 12321 1234321 123454321 12345654321 …

code-golf language-agnostic kolmogorov-complexity  
asked by Eric Wilson 16 votes
answered by marinus 13 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