text
stringlengths
180
608k
[Question] [ ### Background This challenge is about the game of Go. Go is a game played on a board with a square grid `N x N`. You don't have to know how to play the game to do this challenge, but if you are interested, google "Tromp-Taylor rules" for a minimal and precise set of rules to play a full game. Let's us...
[Question] [ This challenge is from a game, [Keep Talking And Nobody Explodes](https://keeptalkinggame.com/). *It's hard to say how this mechanism works. The engineering is pretty impressive, but there must have been an easier way to manage nine wires.* — from the [manual](https://ktane.timwi.de/HTML/Wire%20Sequenc...
[Question] [ Although what is a [Pascal's triangle](https://en.wikipedia.org/wiki/Pascal%27s_triangle) is well-known and we already can [generate](https://codegolf.stackexchange.com/questions/3815/generate-pascals-triangle) it, the task is now different: **Output** \$n\$ first lines of the Pascal's triangle as co...
[Question] [ ## Background A spanning tree ([Wikipedia](https://en.wikipedia.org/wiki/Spanning_tree)) of an undirected graph is a subgraph that is a tree which includes all of the vertices of the original graph. The following is an example of a spanning tree of a 4-by-4 grid graph. ![](https://upload.wikimedia.org/...
[Question] [ Your task is to take two single-variable integer polynomial expressions and multiply them into their unsimplified first-term-major left-to-right expansion (A.K.A. [FOIL](https://en.wikipedia.org/wiki/FOIL_method) in the case of binomials). Do not combine like terms or reorder the result. To be more exp...
[Question] [ ## Introduction *(may be ignored)* Putting all positive numbers in its regular order (1, 2, 3, ...) is a bit boring, isn't it? So here is a series of challenges around permutations (reshuffelings) of all positive numbers. This is the second challenge in this series. The first challenge can be found [he...
[Question] [ I was playing around with cellular automaton and I found one that had some interesting behavior. Here's how it works: It reads a binary string from left to right, if it encounters a `1` followed by `2` other values it will append a `0` to the result and continue reading. If it encounters a `0` (or ther...
[Question] [ ***See also: [Wordagons](https://codegolf.stackexchange.com/questions/92297/hexagolf-wordagons)*** ## Challenge Given a hexagon and a number `n` as input, output the same hexagon rotated `n` times. ## Hexagon The hexagon will be a string like so: ``` a b c d d e e f f o g g h h i i j k l ``` The ...
[Question] [ This one is simple to describe and I could hardly believe that this was not golfed before: For a given image (whatever format is supported by your language), find the unique colors and output a list of the colors. * Print the color code in hex RGB, that is a hash sign `#` followed by 2 digits for R, 2...
[Question] [ Write a program or function where a matrix A (maximum value of dimensions of the matrix is 100) is transformed to a new matrix B. Each element of the new matrix B is the sum of the positive neighbors of the corresponding element of the matrix A. Only neighbors in the four orthogonal directions are cons...
[Question] [ ### Challenge Recognize ASCII art numbers. To make things interesting, three random points in the image might be flipped. For example: ``` ***** * ** ** ** ** ** ``` ### Input A 7x7 ASCII art number generated by the below Python script. ### Output A digit. ### Testing script He...
[Question] [ You are given a 16-bit machine and told to implement multiplication of arbitrary-sized integers. Your registers can only hold 16-bit numbers, and the biggest multiply instruction takes two 8-bit inputs and generates a 16-bit result. Your program must take as input two arbitrary-sized positive numbers a...
[Question] [ A finite-permutation is a function which takes an \$n\$-tuple and produces an \$n\$-tuple such that every element of the input is present in the output, and the ordering does not rely on the values of the inputs. We can unambiguously represent these permutations with an \$n\$-tuple where each element i...
[Question] [ ### The challenge: Assuming you have \$ X \$ collections, each collection \$ C\_i \$ has a name \$ N\_i \$ and a capacity \$ N\_i \$ of elements - Determine which collection will be overflowed first while counting the occurrences of the names in a cyclic list. Also print how many cycles of the list occ...
[Question] [ A first order separable ordinary differential equation is (arguably) the easiest type of differential equation to solve, and takes the form of $$N(y)\frac{dy}{dx} = M(x) \\ y(x\_0) = y\_0$$ For two given functions \$N(y)\$ and \$M(x)\$ and an initial condition \$y(x\_0) = y\_0\$. Your task is to take ...
[Question] [ I like card game challenges so I made this one for the Italian card game Scopa. My family has been playing this game since time immemorial. It has a very interesting scoring system that should be fun to golf. I will post an answer in R to get the fun started, that I am sure people will improve upon. **...
[Question] [ ## Challenge Given a grid size, obstacles' positions, player position and target position your task is to find a path for the player to get to the target and avoid the obstacles at the same time (if necessary). [![enter image description here](https://i.stack.imgur.com/10YGB.png)](https://i.stack.imgur...
[Question] [ So your task is to take a 3x3 block where `-`'s mean blank spaces, and `*`'s mean filled spaces, for example: ``` -** -*- *-* ``` and rearrange the block so that the `*`'s form an X, like this: ``` *-* -*- *-* ``` **Input:** 3x3 squares like above, they can be 3 lines, an array, or however you want. **...
[Question] [ There's already a comprehensive list of tips for python [here](https://codegolf.stackexchange.com/questions/54/tips-for-golfing-in-python), so what I'm asking for are tips that specifically apply to using the `numpy`, `scipy` or `pylab` libraries. These can be either ways to shorten code already using ...
[Question] [ An [Izhikevich neuron](https://www.izhikevich.org/publications/spikes.pdf) is a simple yet quite effective model of a biological neuron, designed for use in a discrete time-stepping simulation. In this golfing challenge, you will be implementing this model. **Parameters** This model involves only 7 var...
[Question] [ m|Y bR|ain is We|iRd. F(o)R T(h)E La|sT fi(v)e YE|ars O|R s|o, (I) ha|ve C(u)T wO|rds in h(a)lf wh|En (I) s(e)e Th|em. Wh|EN I started Do|ing it, it To|oK a meN|TaL effort - B(u)T I almost cou(l)dn't N(o)T d|o it. N(o)w, I d|o it in the back of my head, a(n)d hardly ev|en not|iCe it. However, I thought...
[Question] [ You're given a **n-by-m** matrix of integers, where **n,m > 3**. Your task is to find the **3-by-3** sub-matrix that has the lowest mean, and output this value. **Rules and clarifications:** * The integers will be non-negative * Optional input and output format * The output must be accurate up to at le...
[Question] [ Imagine this, we have an environment with a global scope containing just a single object, called `codegolf`. This object has a single child called `stackexchange`, which has a property called `com`. Accessing this property would look like `codegolf.stackexchange.com`. ### The challenge The input of y...
[Question] [ The task is to display ascii table for a given array. ### Input The input is an 2D matrix. The matrix's row length is same with the length of an array. Alternatively, you can take input of an 2D matrix with the first row is a header. The outer dimension is the row. Example Input: ``` [["License","2008-...
[Question] [ Write a program that takes an input string of length 2 or more characters and adds the string `~BOO!~` (that string has a leading and ending space) in a *uniformly random* spot in the string that is not on either end. --- **Disallowed sample inputs**: `2` or (an empty input) **Disallowed sample outp...
[Question] [ Does anyone have any [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") tips for golfing in [Processing](http://processing.org)? It is a graphical extension of java, and is somewhat difficult to golf. [Answer] * If no animation is required, you can skip the `void draw()` ...
[Question] [ The task is to count the number of disjoint `11` blocks in a 64-bit word, using the minimum number of straight-line instructions. That is, how many nonoverlapping neighbored pairs of 1-bits can be found. ## Examples (imagine leading zeros to fill up to 64 bits) ``` Input Output 111111 3...
[Question] [ Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details. --- An Elf is hopping on a chessboard which extends infinitely in all four directions. The...
[Question] [ Let \$S \subset \mathbb N\_{\geq0}\$ be a subset of the nonnegative integers, and let $$ S^{(k)} = \underbrace{S + S + \dots + S}\_{k\ \textrm{times}} = \{ a\_1 + a\_2 + \dots + a\_k : a\_i \in S\}. $$ For example, $$\begin{align} \{1,2,3\}^{(2)} &= \{1+1, 1+2, 1+3, 2+1, 2+2, 2+3, 3+1, 3+2, 3+3\}\\ &=\...
[Question] [ # Challenge Write a program that compresses and decompresses ASCII text losslessly. It should be specialized to work well with palindromes, including case-insensitive and punctuation-insensitive palindromes. The best compression with the smallest source wins. ## Scoring `total_bytes_saved / sqrt(progra...
[Question] [ # Problem Draw a hexagon chain `x` long, each with side of `y` length # Input `x` - the length of the chain <= 50 `y` - the length of each side <= 50 # Examples `x=1,y=1` ``` _ / \ \_/ ``` `x=4,y=1` ``` _ _ / \_/ \_ \_/ \_/ \ \_/ \_/ ``` `x=3,y=2` ``` __ __ / \ / \ / \__/ \ \ ...
[Question] [ ***UPDATE***: **The gist-files are updated (including new submissions) as the Controller.java did not catch Exceptions (only errors). It does now catch errors and exceptions and also prints them.** *This challenge consists of two threads, this is the cat thread, the catcher thread can be found [here](h...
[Question] [ Given a setup of dominoes your task is to figure out which dominoes fall and which don't. ## Input Take a rectangular ASCII representation of a domino setup. The following characters are used for the ASCII grid: * (space): empty cell * `|`, `-`, `/`, `\`: dominoes Dominoes can fall in 8 directions, whi...
[Question] [ Windows Batch (CMD) is probably the least suitable language for code golfing. **Avoid newline characters**. If you're looking for the shortest code in bytes, as opposed to characters, you will want to get rid of all unnecessary carriage returns (newline characters = 2 bytes). You can use the `&` operat...
[Question] [ Anyone who is moderately into low level code optimization know about the perils of branching, be it implemented as if-statements, loops or select-statements the possibility of a branch misprediction is a terrible clock-wasting thing. Simple problems can be solved much better with simple arithmetic, so ...
[Question] [ Your task is to create one brainfuck program for each of the following binary operators. Each program should take one or two 8-bit numbers (A and B) from input and calculate the specified operation: 1. `A XOR B` 2. `A AND B` 3. `A OR B` 4. `A Shifted Left by 1 (circular shift)` 5. `NOT A` You do not ha...
[Question] [ An interesting puzzle came to me looking at the elevator buttons this morning. You are required to generate a list of all [Braille](http://en.wikipedia.org/wiki/Braille) patterns that fit in a 2x3 grid. Use a hash `#` to denote a bump and a hyphen `-` to denote a flat area. Expected output sample: ``` ...
[Question] [ ## Challenge > > Write a function which takes an argument which is a verb, and returns the past tense of the verb. (Assume that the verb is regular) > > > ## Past tense Note: consider y as neither consonant nor vowel. Normally, just adding `ed` after the end of verb makes the past tense of the ver...
[Question] [ Given the amplitude and period for a wave, print the wave. See sample output for more details. The total number of wave forms equals the period, and the height of each wave equals the amplitude. Amplitude and Period are less than 10. You can ignore the trailing spaces but not the leading spaces. ``` Sa...
[Question] [ Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details. --- There's a good news and a bad news. Good news: you got a Christmas present from Santa....
[Question] [ Uilta is a minority tungusic language spoken in the far east of Russia. A neat thing about Uilta is that it has pitch accent which can be predicted by a computer program. In this challenge we are going to take Uilta a word and determine where the accent peak is. Let me explain how this can be done. ## ...
[Question] [ A *Steiner quadruple system* \$SQS(n)\$ is a collection of subsets (*blocks*) of size 4 of a set \$S\$ of size \$n\$ such that every subset of \$S\$ of size 3 is in exactly one block. It is easy to show that the number of blocks is \$\frac14\binom n3\$ and that a necessary condition for an \$SQS(n)\$ t...
[Question] [ Inspired by [this OEIS entry](https://oeis.org/A193764). ## Background A **saturated domino covering** is a placement of dominoes over an area such that 1. the dominoes are completely inside the area, 2. the dominoes entirely cover the given area, 3. the dominoes may overlap, and 4. removal of any domi...
[Question] [ [Question inspired by [Can you calculate the average Levenshtein distance exactly?](https://codegolf.stackexchange.com/questions/197565/can-you-calculate-the-average-levenshtein-distance-exactly) . Thank you Anush. ] The [longest common substring](https://en.wikipedia.org/wiki/Longest_common_substring_...
[Question] [ [Sandbox Post](https://codegolf.meta.stackexchange.com/a/16815/78039) **Intro** The information panels are everywhere. When the technology became cheaper, the paper posters were transformed into luminous signs that show words that appear on one side and come out on the other, like the one on the figure...
[Question] [ # Description : Given `x` and `y` positions of two circles along with their `radii`, output the area of intersection of the two circle. --- # Input : You will be given following input : ``` array 1 = x and y positions of circle a array 2 = x and y positions of circle b radius = radii of the two congru...
[Question] [ *(with apologies to [Jim West](http://thinkexist.com/quotation/bridges-are-metaphors-for-everything-in-life-the/568318.html) for the title, and randomly inspired by Cisco's textual representation of their logo:* `.:|:.:|:.` *for the concept)* Given an input integer `1 <= n <= 255`, output an ASCII art ...
[Question] [ Your task is to, as the title discreetly suggests, make a bad fade animation of one word turning into a second word for yours truly. **What exactly *is* this "fade animation" you may ask?** To make a spectacular(ly bad) fade animation, you take two strings which will contain only printable ASCII charac...
[Question] [ ## Disclaimer While I know there is [this particular related question](https://codegolf.stackexchange.com/questions/79668/is-the-electric-garage-door-open), my question uses two garage doors, a randomizing component, and I'm also basing this on real life events, seeing my son accidentally lowered one o...
[Question] [ Many important topics in abstract algebra involve a binary function acting on a set. A number of properties of such functions have been defined in the investigation of such topics. Your challenge will be to determine whether a given binary function on a given domain possesses five of these properties. ...
[Question] [ In a round of the [prisoner's dilemma](https://en.wikipedia.org/wiki/Prisoner%27s_dilemma) exercise, two players each decide whether to *cooperate* or *defect* for that round. The scoring for a round is: * Player A and Player B both cooperate: **1 point for both** * Player A and Player B both defect: *...
[Question] [ ## Background A [polyomino](https://en.wikipedia.org/wiki/Polyomino) is called *L-convex*, if it's possible to travel from any tile to any other tile by an L-shaped path, that is, a path that goes in the cardinal directions and changes direction at most once. For example, the polyomino of `1`s in the f...
[Question] [ You should write a program or function which receives a string describing the floor as input and outputs or returns the area of the simplest meta-tiling which could create the given pattern of the floor. The floor is a part of a square grid. Every square tile is colored either azure or black (represent...
[Question] [ ## Challenge Your challenge is to design an interpreter for a lisp-like language, which will from hence forth be coined: *GLisp*. The program code for *GLisp* will consist of an arbitrary amount of nested expressions denoted by brackets, in the following form: ``` (func arg1 arg2 ...) ``` Note that the...
[Question] [ Entries for this challenge will display an animated rotating [Lissajous figure](http://en.wikipedia.org/wiki/Lissajous_curve). The appearance of 3d rotation occurs as the x parameter is successively phase-shifted in each frame. ### Input: The `a` and `b` parameters (as per the [wikipedia article](http:...
[Question] [ There already have been multiple [challenges](https://codegolf.stackexchange.com/questions/160069/finite-field-multiplication?noredirect=1&lq=1) [about](https://codegolf.stackexchange.com/questions/252189/carryless-factors?noredirect=1&lq=1) [carryless](https://codegolf.stackexchange.com/questions/5024...
[Question] [ Scientists have made contact with a parallel universe. Just one problem: They write math differently. Help the scientists make a program that can convert normal math expressions to their equivalent in alternate universe math. The connection through the portal is bad so your code needs to be as short as...
[Question] [ MD5 checksums are relatively easy to crack. For this challenge you will create two separate programs, the first one writing `Hello, World!` and the second one writing `Goodbye Cruel World!` but with the source code having identical MD5 hashes. * The source code of both programs must not be identical. *...
[Question] [ This question is inspired by [Kevin Cruijssen's question](https://codegolf.stackexchange.com/questions/182212/lay-out-the-carpet). Now that the carpet is laid out, we want to roll it. Your task is to write a program that takes a string and returns a spiral made from this string (representing a rolled c...
[Question] [ [Hexagonal tessellations](https://en.wikipedia.org/wiki/Hexagonal_tiling), or tilings of the plane, are three-colorable -- meaning that using only three colors, such as Red, Blue, and Green, every hexagon can be colored without any two hexagons that share a border sharing a color. [A partial example](h...
[Question] [ Your task is to make a program that prints out its own source. "Hey, we already have this challenge, and tons of variations of it! Why are you making another one?" you may ask, but this one is going to be one of the most difficult ones (hopefully, anyway). Your quine must be "mutation-hardened", which ...
[Question] [ Given two positive integers, 'a' and 'b', output an ascii-art "box" that is *a* characters wide and *b* characters tall. For example, with '4' and '6': ``` **** * * * * * * * * **** ``` Simple right? Here's the twist: The border of the box must be the characters of "a" and "b" alternating. This sta...
[Question] [ An [alternating sign matrix](https://en.wikipedia.org/wiki/Alternating_sign_matrix) is an `n` by `n` matrix consisting of the numbers -1, 0, 1, such that: * The sum of each row and column is 1 * The nonzero entries in each row and column alternate in sign These matrices generalise permutation matrices,...
[Question] [ Write a program or function that takes no input but prints or returns a constant textual depiction of a rectangle made of the 12 distinct [pentominoes](https://en.wikipedia.org/wiki/Pentomino): [![12 pentominoes](https://i.stack.imgur.com/BRVgy.png)](https://i.stack.imgur.com/BRVgy.png) The rectangle m...
[Question] [ ### Background Last time, we [counted groups of a given size](https://codegolf.stackexchange.com/q/58408), which is a non-trivial problem. This time, we'll only count *[Abelian groups](https://en.wikipedia.org/wiki/Abelian_group)*, i.e., groups with a commutative operation. Formally, a group **(G, ∗)**...
[Question] [ Alice and Bob like to play a card game, with a deck of cards numbered with consecutive nonnegative integers. Alice has a very particular way of shuffling the deck, though. First, she takes the top card from the deck and puts it at the bottom of the deck. Then she removes the next card, and starts a pil...
[Question] [ Out of all of mathematics, there will always be a few theorems that go beyond all common sense. One of these is the fact that there are different sizes of infinity. Another interesting fact is the idea that many infinities which seem to be of different size are actually of the same size. There are just...
[Question] [ **Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers. --- **Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/474/edit). Closed 2 years ago. [Improve this question](/posts/474/edit) Writ...
[Question] [ Given a constructible point \$(x, y) \in \mathbb R^2\$, output the steps required to construct \$(x, y)\$ ### Constructing a point Consider the following "construction" of a point \$(\alpha, \beta)\$ in the Cartesian plane: Begin with the points \$(0, 0)\$ and \$(1, 0)\$. Then, more points can be added...
[Question] [ Given a directed network, with a single source and a single sink, it is possible to find the maximum flow through this network, from source to sink. For example, take the below network, \$G\$: [![enter image description here](https://i.stack.imgur.com/iLXnn.png)](https://i.stack.imgur.com/iLXnn.png) He...
[Question] [ The Golden Ratio Bureau is obsessed with this new thing they call base-phi. You see it and decide to code-golf, as is your natural instinct. To be specific, base-phi is a number system like base 10, except it uses the number phi, or the golden ratio, as its base. A ones digit would be x\*10^y, but in b...
[Question] [ # Definitions * **Euler Phi Function** (AKA **totient function**): a function which takes in a positive number and returns the number of positive numbers less than the given number which are co-prime with given number. It is denoted as `φ(n)`. * **Reachable number**: if there exists a positive integer ...
[Question] [ Here's a relatively simple challenge for you: Given a list of positive integers: * Line them up in a grid, and sum each column. For example, if the input was `[123, 7, 49, 681]`, the grid would look like this: ``` 1 2 3 7 4 9 6 8 1 ``` And the sum of each column would be `[18, 19, 4]`: ``` ...
[Question] [ # Rolling the Dice So, I was rolling dice a while ago and thought of a challenge. Given the cube with a net taken from input and a list of moves, find the square on the bottom at the end. ![Cube Map](https://i.stack.imgur.com/qgtGp.png) I will use this image for the examples here. ### Input You take in...
[Question] [ You are given a nonnegative integer `n` and an integer `p >= 2`. You need to add some `p`-th powers (`p=2` means squares, `p=3` means cubes) together to get `n`. This is always for any nonnegative `n`, but you don't know many `p`-th powers (of any **positive** integer) you'll need. This is your task: f...
[Question] [ [The International Code of Signals flag alphabet](http://en.wikipedia.org/wiki/International_maritime_signal_flags) is used by ships for communication, particularly for static signals. Your challenge is to write a program or function that will take a string from STDIN or as an argument, and display the...
[Question] [ A [**cyclic tag system**](http://en.wikipedia.org/wiki/Tag_system#Cyclic_tag_systems) is a tiny, Turing-complete computational model consisting of a two-symbol alphabet (I'll use `{0,1}`), a finite, nonempty cyclic list of *productions* that consist of those two symbols, and an unbounded *word* which a...
[Question] [ # Flavour text The stack-based esolang [Underload](http://esolangs.org/wiki/Underload) has some interesting ties to functional programming. One of them is its treatment of the numerical datatype—like the lambda calculus, you represent the natural number N by a function which perform an action N times. ...
[Question] [ I'd like to introduce a new? programming language I call Shue (Simplified Thue). It has very simple syntax. Here is a program that checks if an input is divisible by three: ``` yes no 3=0 4=1 5=2 6=0 7=1 8=2 9=0 00=0 01=1 02=2 10=1 11=2 12=0 20=2 21=0 22=1 0=yes 1=no 2=no ``` [Try it online!](https://t...
[Question] [ ## Background Related: [a golflang theory I posted in TNB a while ago](https://chat.stackexchange.com/transcript/240?m=58722627#58722627) **At-most-\$n\$-ary trees** are rooted trees where each internal node has between 1 and \$n\$ children (inclusive). Two trees are considered identical only if the sh...
[Question] [ # Cops' thread In this thread, your task is to make a recursion-based program/function to generate any integer series. Robbers will try and find a shorter non-recursive solution over in the **[Robbers' thread](https://codegolf.stackexchange.com/questions/157398/this-challenge-is-about-recursion-robbers...
[Question] [ You might already be familiar with the game: [Basketball FRVR](https://www.facebook.com/basketballfrvrgame/) in facebook. There are two types of score you can make: * **A virgin-shot:**(we call it so in our country :D) When the ball enters the basket without touching the rim or * **A stale shot:** When...
[Question] [ ### You know those Windows boxes where you can only do one thing? [![Windows Error Box: Proceeding will delete the contents of your hard drive. What do you want to do? <Proceed> <Delete>](https://i.stack.imgur.com/a5L4U.jpg)](https://i.stack.imgur.com/a5L4U.jpg) ### Let's take this to the next level! #...
[Question] [ [Golomb rulers](https://en.wikipedia.org/wiki/Golomb_ruler) are sets of non-negative integers such that no two pairs of integers in the set are the same distance apart. For example, `[0, 1, 4, 6]` is a Golomb ruler because all distances between two integers in this set are unique: ``` 0, 1 -> distance ...
[Question] [ ## Scenario I often cook lasagne, but I also have a few mistakes. Since I repeat these faults so often, I thought I maybe could do a program that checks if I did everything right. ## Valid lasagne A valid lasagne is * At least 5 columns wide * At least 4 layers high + Excluding extra cheese * The top ...
[Question] [ # Introduction to Numerical Mathematics This is the "Hello, World!" of PDEs (Partial Differential Equations). The Laplace or Diffusion Equation appears often in Physics, for example Heat Equation, Deforming, Fluid Dynamics, etc... As real life is 3D but we want to say "Hello, World!" and not sing "99 b...
[Question] [ *.i xu .e'o lo zunsnagri cu drani loka jboge'a* --- Given an input of a string consisting of two characters, output whether it is a valid consonant cluster in Lojban. Here is a quote from [CLL 3.6](https://lojban.github.io/cll/3/6/) detailing the rules for a valid consonant cluster pair (or rather, an ...
[Question] [ Back in 1965, The Beatles released their hit song ['Eight Days a Week'](https://youtu.be/kle2xHhRHg4). In this [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") challenge we are going to reimagine dates of the 21st century as if there really were eight days a week. ### Input ...
[Question] [ # API Easter egg hunt! There's an API at <http://easter_egg_hunt.andrewfaraday.com> which will provide a special Easter egg hunt, just for you... You can see the API docs at the above address, or try it from here. ## The API: All calls to this API are GET requests, which will return a JSON string. Thes...
[Question] [ Simple challenge: given a series of positive integer numbers, find the number that contains among its digits the longest run of consecutive digits. The trick? It's allowed for the digits in the runs to wrap around the possible values (`0123456789`) and to run backwards. So both `2345`, `89012` and `543...
[Question] [ The [Discordian calendar](https://en.wikipedia.org/wiki/Discordian_calendar) is an alternative calendar used by Discordians. 1. The discordian year has 5 seasons, each lasting 73 days: Chaos, Discord, Confusion, Bureaucracy, and The Aftermath. 2. The discordian week has 5 days: Sweetmorn, Boomtime, Pun...
[Question] [ # What's the Binary Time? Everybody knows what the normal time is. It's up there in the top-right (or wherever you put it) of your screen. But a question people rarely seem to ask themselves is this: What's the *binary* time? ## Binary Time Binary Time (True Binary Time) works by first reading the most...
[Question] [ Calculate a product or ratio of SI units. For example, `kg m / s s` (kilogram-meter per second squared) should return `N` (newton). The input will always be either: * A list of symbols for SI units, space-separated (representing a product) or * The above, `/`, and the above (representing a ratio). The ...
[Question] [ There are two pieces of wood. Both consist of a straight body and some extra blocks below the body. An example piece with extra blocks at (0-indexed) positions 0,4,7,9,10: ``` XXXXXXXXXXX X X X XX ``` The piece can be represented as a `01` binary sequence with the `i`th character showing if there is...
[Question] [ **Description** Given a source path and a destination path, output the relative path to the destination with respect to the source. **Rules** 1. The input can come from stdin or as arguments to the program/function. 2. Both Windows and Unix style paths must be supported. 3. The output path can use `/` ...
[Question] [ The goal of this code-golf is to create a program that takes a string as input, and you have to output the [SHA-1](http://en.wikipedia.org/wiki/SHA-1) hash value as a hexadecimal number. You can find the pseudocode for SHA-1 [here](http://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode) Other rules: 1. No...
[Question] [ [@BeastlyGerbil](https://codegolf.stackexchange.com/users/70004/beastly-gerbil) presents, the world's very first **MOBIUS SUDOKU**: > > [![Picture of the original strip.](https://i.stack.imgur.com/0So5Z.png)](https://i.stack.imgur.com/0So5Z.png) > > > --- [![Screenshot of the strip in Google Sheets...
[Question] [ [Carcassonne](https://en.wikipedia.org/wiki/Carcassonne) is a tile-based game, where the objective is to construct Roads, Cities and Monasteries, in order to score points. The game works by players taking turns to draw and place tiles to construct a landscape, then claiming roads, cities and monasterie...
[Question] [ # Help PPCG Claus Deliver his Presents # Overview PPCG Claus is running hella late delivering his gifts because nowadays we have so many odd little kiddos out there. This makes it much harder for PPCG Claus to get all the presents to the correct place. Your challenge is to help him delvier his presents...
[Question] [ A difference pyramid is a pyramid where each new diagonal is the absolute value of the differences between the elements of the last diagonal. For example, if we start with the array ``` 2 5 4 9 3 4 ``` Now, we arrange these in a diagonal column: ``` 2 5 4 9 3 ...