Top new questions this week:
|
Following last year’s event, we’re doing Code Golf Advent Calendar 2022! On each day from today (Dec 1) until Christmas (Dec 25), a Christmas-themed challenge will be posted, just like an Advent …
|
I like to play (The Settlers of) Catan on Board Game Arena with totally random number tokens. These tokens determine the production rate of the terrain tiles beneath: There are 18 number tokens, two …
|
Your task Given a string, output the range of ASCII values. Example Let’s say we have the string Hello. We get the ASCII values: …
|
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details. Christmas is coming up, and Santa hasn’t kept to his diet very well this year. Due to his size, he is getting the …
|
“Cut” a matrix of integers on the line where the sum of the absolute differences of “severed” neighbors is the least. Example Consider this matrix: …
|
Given a matrix of integers \$M\$ and a list of four integers \$L\$, find the sub-matrix \$N\$ whose corners are given by \$L\$ and return the sum of its elements. Suppose you’re given the list \$L = […
|
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details. An Elf is hopping on a chessboard which extends infinitely in all four directions. They move like a generalized …
|
Greatest hits from previous weeks:
|
Print or return the following string: …
|
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 …
|
Definition of long text Long text usually shows emphasis, for instance, loooooool or yaaaaaaaaaay. Usually the vowel is …
|
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 …
|
Write the shortest program that prints the entire lyrics of “Never Gonna Give You Up” by Rick Astley. Rules: Must output the lyrics exactly as they appear in the above pastebin*. Here’s the raw dump:…
|
Here is a 1.2Mb ASCII text file containing the text of Herman Melville’s Moby-Dick; or, The Whale. Your task is to write a program or function (or class, etc. — see below) which will be given this …
|
You are given two true color images, the Source and the Palette. They do not necessarily have the same dimensions but it is guaranteed that their areas are the same, i.e. they have the same number of …
|