Code Golf Stack Exchange Community Digest

Top new questions this week:

Sorting with a deque

You're given an array of positive integers. Your job is to sort them using an initially empty deque (double-ended queue) by the following procedure: Take a number from the front of the array, and ...

code-golf decision-problem sorting data-structures  
user avatar asked by Bubbler Score of 20
user avatar answered by Albert.Lang Score of 9

Wait, ASCII was 128 characters all along?

Challenge In this challenge, you have to take a nonnegative integer as input, convert it into base-128 bytes (0 → 0x00, 127 → ...

code-golf decision-problem base-conversion printable-ascii  
user avatar asked by squareroot12621 Score of 17
user avatar answered by Arnauld Score of 7

Reorder for smallest largest prefix sum

Given a multiset of integers, order them such that the largest absolute prefix sum $$\max_i \left| \sum_{k<i} a_k \right|$$ is smallest. Output any solution if multiple exist. You can assume input ...

code-golf  
user avatar asked by l4m2 Score of 13
user avatar answered by emanresu A Score of 7

Check if two lists are permutations of each other

Challenge Given two lists, find if one of them is a permutation of the other. Output truthy or falsy values, or 1 or 0. Test case Examples ...

code-golf decision-problem permutations  
user avatar asked by Andy Liu Score of 2
user avatar answered by Seggan Score of 3

Greatest hits from previous weeks:

Is this number a prime?

Believe it or not, we do not yet have a code golf challenge for a simple primality test. While it may not be the most interesting challenge, particularly for "usual" languages, it can be nontrivial in ...

code-golf number number-theory primes decision-problem  
user avatar asked by Dennis Score of 236
user avatar answered by histocrat Score of 265

Draw the national flag of Iceland

This year's UEFA Euro 2016 is over and besides a couple of negative headlines there has been a very positive surprise as well – the Iceland national football team. Let's draw their national flag. ...

code-golf kolmogorov-complexity graphical-output geometry  
user avatar asked by insertusernamehere Score of 113
user avatar answered by Gábor Fekete Score of 270

Is this even or odd?

Note: There is not been a vanilla parity test challenge yet (There is a C/C++ one but that disallows the ability to use languages other than C/C++, and other non-vanilla ones are mostly closed too), ...

code-golf arithmetic number-theory decision-problem  
user avatar asked by Matthew Roh Score of 79
user avatar answered by Luis Mendo Score of 131

Code that will only execute once

Goal The goal of this challenge is to write code that will execute once and only once. This means basically that it damages the program, script, or environment in some way. If rebooting the system ...

popularity-contest stateful  
user avatar asked by ojblass Score of 251
user avatar answered by Martin Ender Score of 549

Survival Game - Create Your Wolf

The Board The Board is a two dimensional array of cells. Cells are populated by Animals. Every day, all Animals on the Board simultaneously make one move. If two or more Animals move to the same cell, ...

king-of-the-hill java  
user avatar asked by Rainbolt Score of 248
user avatar answered by Herjan Score of 48

D&D 5e HP Calculator

I have trouble remembering everything I have to do when leveling up a D&D character. For whatever reason, one of the things that gives me trouble is figuring out what their new maximum HP value ...

code-golf  
user avatar asked by undergroundmonorail Score of 11
user avatar answered by Jonathan Allan Score of 2

Shortest code that raises a SIGSEGV

Write the shortest code that raises a Segmentation Fault (SIGSEGV) in any programming language.

code-golf error-message  
user avatar asked by Anil Arya Score of 118
user avatar answered by null Score of 150
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, 14 Wall Street, 20th Floor, New York, NY 10005

<3