Code Golf Stack Exchange Community Digest

Top new questions this week:

99 ways to say "I love you"

Inspired by this blog post. Write a program that outputs 99 distinct programs (in the same language) that output the string I love you. How the programs are separated from one another in the output ...

code-golf metagolf pristine-programming  
asked by Mason 20 votes
answered by tsh 18 votes

Smallest number such that concatenation is a square

Challenge Write a program or function that takes a number \$n\$ and returns the smallest \$k\$ such that concatenation \$n'k\$ is a square. This sequence is described by A071176 on the OEIS. I/O ...

code-golf sequence  
asked by mabel 18 votes
answered by Kevin Cruijssen 6 votes

Decomposition of a matrix in \$ SL_2(\mathbb{Z}) \$

Background The special linear group \$ SL_2(\mathbb{Z}) \$ is a multiplicative group of \$ 2 \times 2 \$ matrices whose elements are integers and determinant is 1. It is known that every member of ...

code-golf math matrix linear-algebra  
asked by Bubbler 16 votes
answered by Arnauld 7 votes

Are the beams above or below the notes?

In musical notation, groups of notes shorter than one beat are joined together by a line at the bottom called a beam. Here are a few bars of music with the beams highlighted: (Taken from Second ...

code-golf music  
asked by Purple P 14 votes
answered by Robin Ryder 7 votes

Buildings made from cubes

In this fastest-code challenge, you are provided with a set of \$n\$ identical blocks and need to determine how many unique buildings can be constructed with them. Buildings must satisfy the following ...

geometry fastest-code  
asked by Nick Kennedy 14 votes
answered by Arnauld 7 votes

Spotify Shuffle (music playlist shuffle algorithm)

Background Perfect shuffle algorithms like Fisher-Yates shuffle don't produce great results when it comes to music playlist shuffling, because it often produces clusters of songs from the same album. ...

code-golf random  
asked by Bubbler 11 votes
answered by Arnauld 5 votes

Keta Bracket Autocompletion

Special thanks to Bubbler and AdmBorkBork for supplying feedback about this challenge Keta (Keyboard tacit — clever naming, I know!) is a golfing language I’ve been working on recently. One of it’s ...

code-golf string parsing balanced-string  
asked by Jono 2906 9 votes
answered by Neil 4 votes

Greatest hits from previous weeks:

Tips for golfing in JavaScript

What general tips do you have for golfing in JavaScript? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to JavaScript (e.g. "remove ...

code-golf tips javascript  
asked by mellamokb 137 votes
answered by zzzzBov 110 votes

Draw an Image as a Voronoi Map

Credits to Calvin's Hobbies for nudging my challenge idea in the right direction. Consider a set of points in the plane, which we will call sites, and associate a colour with each site. Now you can ...

popularity-contest geometry image-processing  
asked by Martin Ender 170 votes
answered by orlp 112 votes

Implement the Thanos sorting algorithm

The sorting algorithm goes like this: While the list is not sorted, snap half of all items (remove them from the list). Continue until the list is sorted or only one item remains (which is sorted by ...

code-golf sorting  
asked by vrwim 92 votes
answered by Sara J 19 votes

Output with the same length as the code

In this challenge, you should write a program or function which takes no input and prints or returns a string with the same number of bytes as the program itself. There are a few rules: You may only ...

code-golf self-referential  
asked by Martin Ender 97 votes
answered by MD XF 205 votes

GO OUT AND VOTE

Today is November 8th, 2016, Election Day in the United States of America. If you are a U.S. citizen eligible to vote, then go out and vote if you haven't already before answering this challenge. Do ...

code-golf string graphical-output color  
asked by Calvin's Hobbies 114 votes
answered by tuskiomi 116 votes

Smallest python script to print even numbers 0 to 100

I'm work on a problem which I set myself for fun, which is to create a python script which prints the even numbers from 0 to 100. The challenge is to make the script as small as possible. This is what ...

code-golf tips python  
asked by Benedict Lewis 11 votes
answered by feersum 37 votes

Make a circle illusion animation

Your job is to animate this circle illusion. It looks like the points rotating inside of the circle, but they are actually just moving in straight lines. Criterias The result has to be animated. ...

popularity-contest graphical-output animation  
asked by swish 86 votes
answered by trichoplax 130 votes

Can you answer this question?

Cutting Sequence for N dimensions

Inputs: The program or function should take 2 vector-like (e.g. a list of numbers) O and V of the same number of dimensions, and a number T (all floating-point numbers or similar) Constraints: T ...

code-golf sequence geometry  
asked by Hymns For Disco 2 votes
You're receiving this message because you subscribed to the Code Golf community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 110 William Street, 28th floor, New York, NY 10038

<3