Code Golf Stack Exchange Community Digest

Top new questions this week:

Eh, codegolf shmodegolf

This challenge is about implementing Shm-reduplication, originating in Yiddish, where one takes a word, duplicates it, and replaces the first syllable in the second word with "Shm" in order ...

code-golf string parsing  
asked by JSorngard Score of 32
answered by Noodle9 Score of 10

Previous Fibonacci number

The sequence of Fibonacci numbers is defined as follows: \$ F_0 = 0 \\ F_1 = 1 \\ F_n = F_{n-1} + F_{n-2} \$ Given a Fibonacci number, return the previous Fibonacci number in the sequence. You do not ...

code-golf number fibonacci  
asked by pxeger Score of 29
answered by emanresu A Score of 14

Generate All 8 Knight's Moves

Introduction In chess, Knights can move two squares in one direction, and then one square in an orthogonal direction. On an x/y plane, these can be thought of as being a relative change of coordinates,...

code-golf kolmogorov-complexity  
asked by chakra Score of 18
answered by att Score of 13

In between fractions

Given two positive integer fractions \$x\$ and \$y\$ such that \$x < y\$, give the fraction \$z\$ with the smallest positive integer denominator such that it is between \$x\$ and \$y\$. For example ...

code-golf math number-theory rational-numbers  
asked by Wheat Wizard Score of 18
answered by Dominic van Essen Score of 7

Straighten my corners... diagonally

We can arrange the positive integers like this: 1_| 2 | 5 | 10 4___3_| 6 | 11 9___8___7_| 12 16 15 14 13 That is, in L-shaped brackets expanding down and right ...

code-golf sequence grid  
asked by emanresu A Score of 16
answered by Arnauld Score of 7

Reverse hex cipher

Characters in strings are sometimes represented as their ASCII hexadecimal codes. Printable characters have two hex digits in their representation. Swapping those digits leads to another character, ...

code-golf string hexadecimal  
asked by pajonk Score of 15
answered by emanresu A Score of 13

Divisible subset sums

Inspired by the recent 3Blue1Brown video Consider, for some positive integer \$n\$, the set \$\{1, 2, ..., n\}\$ and its subsets. For example, for \$n = 3\$, we have $$\emptyset, \{1\}, \{2\}, \{3\}, \...

code-golf math combinatorics set-partitions  
asked by caird coinheringaahing Score of 15
answered by att Score of 8

Greatest hits from previous weeks:

How can I use cmp(a,b) with Python3?

I was told that using the cmp function can be very useful in code-golf. But unfortunately, Python 3 doesn't have a cmp function. ...

code-golf tips python  
asked by xaxa Score of 17
answered by xnor Score of 36

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 Score of 97
answered by Sara J Score of 20

Polygon prefixes

Polygons are named after the number of sides that they have. A pentagon has 5 sides, an octagon has 8 sides. But how are they named? What's the name for a 248-sided polygon? All polygons are suffixed ...

code-golf geometry  
asked by beary605 Score of 17
answered by baby-rabbit Score of 5

I copied my password to the clipboard! Can you delete it?

Following the best security practices, I keep a plain text file with my passwords on my hard drive. In fact, I just copied and pasted one of them to access my PPCG account. In a lucid moment, I decide ...

code-golf  
asked by Luis Mendo Score of 103
answered by Adám Score of 24

Increment The Time

Every digital clock contains a small creature that has to advance the time every minute [citation needed]. Due to the popularty of digital clocks and the popularity of catching them in the wild, they ...

code-golf string number date  
asked by flawr Score of 59
answered by Dominic van Essen Score of 59

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 ...

code-golf metagolf pristine-programming  
asked by Mason Score of 23
answered by tsh Score of 19

I'm not the language you're looking for!

Isn't it annoying when you find a piece of code and you don't know what language it was written in? This challenge attempts to somewhat solve this. Challenge You will have to write a program that ...

code-golf polyglot  
asked by Blue Score of 195
answered by jimmy23013 Score of 92
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