Questions tagged [code-golf]
The code-golf tag has no summary.
10 questions
7 votes
1 answer
476 views
Complete set of 31 numbers which are not the sum of distinct squares
A001422 gives the whole set of 31 numbers which are not the sum of distinct squares (see also MathWorld). That article also provides code for it: ...
27 votes
7 answers
5k views
Creating the Yin Yang symbol with minimal code
The following code creates the Yin Yang symbol ...
6 votes
2 answers
430 views
Best way to apply a list of functions to a list of values?
This question is closely related to questions 83720, 17460, and 11298. How would you write the operator F = Through[#1[#2]] & in the prettiest, fastest, or ...
16 votes
2 answers
1k views
How to implement Bresenham’s algorithm as a system of equations?
Bresenham's line drawing algorithm is usually implemented via loops. But in Mathematica we can take advantage of its ability to solve Diophantine equations. From educational viewpoint it is quite ...
7 votes
1 answer
624 views
Celebration: How to golf a marriage with a prefix free code
We all know a conspicuous member of our community got hitched recently. As most of us are not in Malta, and weren't able to fly there, I thought of a celebration question. Sort of. The challenge is ...