instruction
stringlengths
34
53.1k
On some old Nokia phones, there was a variation of the fifteen puzzle called Rotation. In this variation, instead of sliding one tile at a time, you rotated four tiles at a time in one direction. In this game, you'd start out with a board like this: 4 9 2 3 5 7 8 1 6 And by rotating the lower-left block twice clockwis...
You need to implement immutable dictionaries using only functions without any other data types (custom or built-in). The dictionary must be indexed by any data type of class Eq and contain values of arbitrary type, but all the values in a dictionary should be of the same type. Here are some examples of usage: dict `acc...
Write a program that counts and prints the number of characters in it's own source code to standard output. The number must be generated from counting the characters. This Ruby solution would not be allowed: puts 6 because it is not calculated. Spaces, tabs, new lines, etc should be counted. The program must be small...
Input: An RGBA hex color c (ex. FFFF00FF) and an integer > 0 and < 1000 n (ex. 200). Output: Raw bytes of a PNG file such that when the output is saved to a file and opened in an image viewer, an n by n image filled with the color c is displayed. Specification: Your program should output exactly: a PNG header (89504E4...
Your task is to generate a null-pointer exception. That is, your program must accept a value which it expects to be non-null, and throw an exception/error or crash because the value is null. Furthermore, it can't be obvious from reading the code that the value is null. Your goal is to make it seem clear to the reader t...
In the highly underrated Steampunk novel The Difference Engine, the equivalent of cinema houses delivered a pixelated moving image displayed by tiles which could be flipped mechanically. The control engine for orchestrating the movement of the these tiles was a large noisy machine controlled by a deck of punched cards....
The problem is to create a string of the same character repeated 100 times. One potential solution in JavaScript is: var i = 100, s = ''; while(i--) s += "Z"; Shortest code wins.
Your mission is not so simple. You have to write a program that decodes QR-codes. There are some things that are not permitted: Making web requests (except https://i.stack.imgur.com/sCUJT.png or https://i.stack.imgur.com/mXUcd.jpg) Using any QR code processing library (Or using any external library to do this) Image ...
The Task: Given a .txt file with frames of ASCII art each separated by a \n (see this example if you are unclear) output a motion picture with frame with 1 frame per second. Note that there is a trailing \n on the final frame. Each frames dimensions will be: X<80 Y<20 The Rules The Previous frame must be cleared bef...
Write a program that connects to this site, downloads the very answer in which it is posted, extracts its own source code and prints it out. The output must be identical to the source code. Shortest code (in bytes) wins. Rules: No URL shorteners allowed. The answer must have a regular format - a heading with the langu...
This is a micro-optimization challenge. The task is to sample from the maximally skewed stable distribution F(x;1,-1,Pi/2,0). See Table 1 of http://arxiv.org/pdf/0908.3961v2.pdf . It is easiest to describe how to do this using the following C code which uses the Mersenne Twister RNG C code from here . #include <stdi...
Lagrange's four square theorem tells us any natural number can be represented as the sum of four square numbers. Your task is to write a program that does this. Input: A natural number (below 1 billion) Output: Four numbers whose squares sum to that number (order doesn't matter) Note: You don't have to do a brute force...
From now on considering the word "fuck" to be non-profane would be a good idea Make the smallest compiler or an interpreter for the Brainfuck variant, Boolfuck. It has to be executable in Windows, DOS, or a Unix operating system (so Linux, Mac, OpenBSD etc). Boolfuck is very similar to Brainfuck, and a complete definit...
If you've ever tried to write palindromic code before, you'd know how much brackets tend to get in your way. ()() is not a palindrome, even though it kinda looks like it should be, while ())( and ()( are both palindromic and both very dumb looking. Wouldn't it be convenient if it was the other way around? A string is c...
Your task is to read an image containing a handwritten digit, recognize and print out the digit. Input: A 28*28 grayscale image, given as a sequence of 784 plain-text numbers from 0 to 255, separated by space. 0 means white and 255 means black. Output: The recognized digit. Scoring: I will test your program with 1000 o...
This was fun! However with only three digits, the fun was over way too soon. This challenge is similar, but we'll keep the fun going. The Challenge Print as many digits of the Golden Ratio φ as possible. The Golden Ratio is defined as the number that satisfies φ = (φ + 1)/φ and the first 100 digits are given by: 1.618...
Appended Numbers Game Write a function/program that takes 2 integer parameters integer parameters or integer variables, a start number, and a max iterations count. The code should perform the following game example to construct a new number, and repeat until the number is a single digit left. eg. 3 7 2 = (3 + 7) & (7 +...
For this challenge, you must implement Ruby's Abbrev module in as little code as possible. Challenge The input will be whatever your language has as an array (array, list, sequence, etc.) of strings. You may write a function, or you may accept comma-separated words on STDIN. You must then calculate the set of unambigu...
As stated, write a program that is capable to, in an automated manner, write more code and another program and execute that program from itself. In short, you are asked to write a program that can write another self-standing program itself and enable it to execute in any function. Do this in the shortest amount of cod...
In this problem on Puzzling.SE, I ask a question about determining the amounts of drug to use in a clinical test to minimize total drug usage and fulfill the requirements of the testing procedure. The problem is as follows, for those of you who currently don't have access to the private beta: A medical researcher is t...
Introduction The arena is a flatland dotted with skyscrapers, which your enemies use for cover. You and your enemies shoot each other with lasers. All of you carry jet packs, allowing flight. Which enemies can you hit with your laser, and which are hiding? Problem First, the size of an arena is given by an integer n on...
A well-known puzzle involves counting how many squares can be made using the points on a 3x3 grid: . . . . . . . . . The answer is 6 — four small squares, one large square, and one square formed from the top, left, bottom, and right pegs, with edges along the diagonals of the squares. Your task is to build a pro...
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 pile with it. Then, ...
Deleted questions on Stack Overflow sometimes make for great golf material. Write a function that takes a nonnegative integer as input, and returns true if all the digits in the base 10 representation of that number are unique. Example: 48778584 -> false 17308459 -> true Character count includes only the function. If ...
Please read the rules, and the bold areas as well. Write a program in any language, so long as it has GUI support for a window system (cannot be text-consoles, etc., and must be a GUI/toolkit/window). The program must say hello world in any manner (splash image, menu bar, status bar, title, video, message box, other wi...
Given a number \$n\$, write a program that finds the smallest base \$b ≥ 2\$ such that \$n\$ is a palindrome in base \$b\$. For example, an input of \$28\$ should return the base \$3\$ since \$28_{10} = 1001_3\$. Although \$93\$ is a palindrome in both base \$2\$ and base \$5\$, the output should be \$2\$ since \$2<5\$...
The quest is to convert an integer to a string in such a way that 1. the order is preserved 2. using the least number of characters in the string. Let's say I have an integer X; the objective is to create a function f (and respective inverse, g, such that: Conditions f(X) is a utf-8 string for all integer X g(f(X)) =...
Anyone who has spent any time around a deck of playing cards will recognize the riffle shuffle. The deck is cut in half and the two stacks are riffled simultaneously into the same pile before being tidied up in a sometimes visually appealing way. This code-golf challenge is to write a function/method/(language equivale...
Task A theatre has 10 rows, labelled A to J from front to back, and 15 seats in each row, numbered 1 to 15 from left to right. The program uses the following rules to choose the best seats. Rule 1: All seats in one booking must be in the same row, next to each other. Rule 2: The seats must be as close to the front as...
Introduction The Babylonians had a clever method for finding square roots. To find the square root of a number N, you start with a guess, then refine it by repeatedly evaluating a line of computer code (or papyrus scroll equivalent): guess = (guess + N/guess) / 2 If the guess is smaller than sqrt(N), N/guess must be ...
Objective Find out how many possible (unique) paths you can take to get from the top left of a NxN grid to the bottom right. The program will receive either 1 integer (or 2 for -20 points bonus) as input for the gridsize. Input has to be anywhere in the range of 1..2000. Output will be a string containing the number of...
A Spirograph is a toy that draws hypotrochoids and epitrochoids. For this challenge, we'll just focus on the hypotrochoids. From Wikipedia: A hypotrochoid is a roulette traced by a point attached to a circle of radius r rolling around the inside of a fixed circle of radius R, where the point is a distance d from the ...
Goal Create a program or pair of programs that collectively disrupt and fix files with the intent of preventing LZMA2 from working effectively. The disrupt and fix routines must be reciprocal, so you can recover the original file exactly. Targets The collected works of Shakespeare in plain UTF-8 (5,589,891 bytes) Wik...
A recent question showed how Mathematica could be used to make a beautiful optical lattice clock image. The image looks like this. This challenge is to reproduce this image as closely as possible using as short code as possible using only easily available open source tools (and without just downloading the image or p...
I have two types of notebook . 10 problems could be solved in one page, in the first notebook. 12 problems could be solved in one page, in the second notebook. For given n problems I have to use pages in such a way that no space from both notebook should be wasted ever . Taking consideration that I have to use mini...
Introduction When building an electronics project, a schematic may call for a resistor of an unusual value (say, 510 ohms). You check your parts bin and find that you have no 510-ohm resistors. But you do have many common values above and below this value. By combining resistors in parallel and series, you should be...
Objective From Wikipedia : A recursive acronym is an acronym that refers to itself in the expression for which it stands. Your goal is to check if a string is a recursive acronym. The acronym is the first word Words are not case sensitive, separated with a single space. The given string does not contain any p...
This is limited to Java and C# by the syntax I guess. In this programming puzzle, you are to produce Exceptions that can be caught but are thrown again at the end of the catch block. try { while(true) try { // you are only allowed to modify code between this try { } brackets } ...
Goal Replace all comments in C, C++, or Java Code with the comment // Do the needful. Specifics This coding challenge is a simple one. Take as input the name of a file. The input file shall contain C, C++, or Java code. The code shall contain one or more comments. The comments can be single line /* */ or // delimit...
As you might know there is a mathematical fun-fact that if you add all natural numbers you end up with... -1/12 (see Wikipedia here). Of course this is very strange result and can not be obtained by just adding one number followed by another, but some special mathematical tricks. However your task is to write a program...
To mark the anniversary of World IPv6 day, the Internet Society has published a campaign to Turn Off IPv4 on 6 June 2014 for One Day. IPv6 addresses may be represented in their long form as eight colon-separated 16-bit hex values. Depending on the address, they may also be shortened as described in item 2 of section ...
Writing questions for programming puzzles is tiring and takes many minutes to do. This is where you come in. Your job is to write a program that randomly generates plausible-sounding (but not necessarily interesting) code golf questions. Input: None Output: One sentence code golf question (see sentence structure) Guid...
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 allows the code to run again that is permitted. Scoring Number of votes. All assumptions must be clearly listed. Any an...
Many of you already know JSF**k. For those who don't, it's a script that basically turns any JavaScript code into something written using only []()!+. Your task is to build, using any language of your choice, a program which converts JSF**k into unobfuscated JavaScript. Input: A string with valid JSF**k code. Output: ...
Introduction From Esolangs.org : Pi is based on the brainfuck language and uses the same instructions as it. Pi works by calculating pi digits and introducing errors in some random digits of them, encoding obfuscated brainfuck instructions. Instructions are encoded as below: '>' '<' '+' '-' '.' ',' '[' ']' 0 ...
For more information on Parity: Wikipedia Challenge Write a program that takes an input (stdin, argv, ect) of four nibbles and two parity nibbles. Your program should then test to see whether the 'block' is valid, using even parity; if it is then output 1. Then try to make any corrections, if correction is possible out...
Write a program that is a sonnet, and when run prints out a sonnet. By "sonnet" I mean: 14 lines Each line, when read aloud, has 10 syllables Symbols can be ignored, or pronounced in whatever reasonable way you want. Popularity contest, most upvotes wins.
Once you grok vi, your muscle memory learns tricks like ggVGx to delete all the text in a file. Trouble is, ggVGx is not an English word, so it makes a terrible mnemonic. This challenge is about constructing a single Vi[m] command that can be reasonably read as an English word, phrase or sentence. One point per letter....
Your task is to write a regular expression that matches any valid regular expression and no invalid expression. You may pick any regex flavour for your answer, but you have to match regular expressions of that same flavour. This is regex-golf, so the shortest regex wins. You can't invent your own regex language for thi...
The Haskell function biSp has type signature biSp :: (a -> c) -> (b -> d) -> (c -> d -> e) -> a -> b -> e and (for those who prefer combinator calculus) can be defined as biSp g h f x y = f (g x) (h y) Your task is to implement biSp in point-free form (equivalently: as a combinator without any lambdas) using only two...
Inspired by... Networking - How can I work out how many IP addresses there are in a given range? Write a program or function that takes two strings as input, each being an IPv4 address expressed in standard dotted notation and outputs or returns the number of IP addresses covered by this range, including the two I...
A dog is leashed to a pole and the owner wants to know if it can venture to the neighbour's building. You're given a map, which contains the pole (represented by x), the owner's buildings (represented by 1) and the neighbour's building (represented by 2). Empty areas are padded with dots and every line has the same len...
Implement an integer parser in the shortest code possible, with the following restrictions: The function or program can only take one argument: a string (or equivalent). Assume it to be signed and always valid (don't worry about decimals, etc.). The input may optionally omit the sign, in which it is assumed to be posi...
The flag of the United States of America contains, in its canton, 50 stars, representing the 50 states. In the past, when there were fewer states, there were of course fewer stars, and they were arranged differently. For example, from 1912-1959 (after the admission of New Mexico and Arizona but before Alaska), there ...
Write a program that seemingly adds the numbers 2 and 2 and outputs 5. This is an underhanded contest. Your program cannot output any errors. Watch out for memory holes! Input is optional. Redefining 2+2 as 5 is not very creative! Don't doublethink it, try something else.
Your challenge is to write a program to translate (English) leetspeak/lolspeak/txtspk into normal English. Your program should read from standard input and output to standard output, unless your language does not support these. You may use a file containing a list of words in the English language, separated by new line...
Pi is Wrong A common method of computing pi is by throwing "darts" into a 1x1 box and seeing which land in the unit circle compared to the total thrown: loop x = rand() y = rand() if(sqrt(x*x + y*y) <= 1) n++ t++ pi = 4.0*(n/t) Write a program that looks like it should correctly compute pi (using this or o...
A set of whole numbers (0-) will be given separated by a space. Some numbers will be missing between certain numbers in the set. Your job is to find the missing odd numbers between them. Conditions The input will be a one line string. Your code must left out a variable for inserting the input case string. The output s...
There are some pretty cool challenges out there involving regex (Self-matching regex, Regex validating regex) This may well be impossible, but is there a regex that will ONLY match itself? NOTE, delimiters must be included: for example /thing/ must match /thing/ and not thing. The only match possible for your expressio...
The 9 Billion Names of God is a short story by Arthur C. Clarke. It's about a group of Tibetan monks whose order is devoted to writing down all the possible names of God, written in their own alphabet. Essentially, they are devoted to writing every possible permutation of their alphabet, restricted by a few rules. In t...
So I really like to mess with tables and shallow and deep copies and I can do it in 239 chars! I wonder if there's a shorter way to do it... Rules: It must be done in less than 239 chars. You must set table.copy.shallow and table.copy.deep. A deep copy must maintain recursion. (so if I had tx.t == tx, a deep copy must...
A string of digits (positive integer) can be converted to plain English in various ways. For instance, 115 can be read as "hundredfifteen", "oneonefive", "elevenfive", "twoonesfive". So question's challenge is to output the shortest string representation for a given digits string. Rules: The input string can start wi...
The goal is to write program that will produce a word unexpectedly (program doesn't look like it is going to produce a word). Example (JavaScript): alert(([0][1]+"").slice(4,8)) alerts "fine" - jsfiddle. Explanations: 1. [0][1] returns undefined, because there only one element in array [0] 2. Adding empty string...
Write a program which takes an integer argument and outputs the number of degree n monic polynomials with coefficients that are -1,1 or 0 which have a root which is a root of unity. To make it a little cleaner, only count polynomials with leading coefficient of 1. You can use any language you like as long as it is fr...
Your program will be given a number as input. Your challenge is to output all the numbers between 2 and 100 inclusive that are co-prime to the given number. (Two numbers are co-prime if their GCD is 1.) If no numbers between 2 and 100 are co-prime to the given number, the program shall not output anything. The program ...
Menu Shortcuts Traditionally, user menus are accessible by keyboard shortcuts, such as Alt + (a letter), or even simply hitting the letter when all textboxes are unfocused (gmail style). Your task Given the menu entries as an input, your task is to grant each menu entry a proper shortcut letter. Write a function or a p...
Write a program that prints "Hello, world!" without using any kinds of literals. Don't use string literals, numeric literals, byte literals, char literals, etc. Default values are allowed in languages that have them. Printing data from external files/websites/arguments is not encouraged. edit: probably don't use Bool...
The Challenge Write a program that outputs Hello World, from line X!, where X is the line number, in the source code, of the actual print statement itself. The Rules In this context, we want the first line number of the statement which outputs the string to be displayed to stdout You should avoid simply searching thro...
A nonogram is a two-dimensional logic puzzle that looks something like this (screenshots from the game Pixelo, my favourite nonogram game): The goal of the game is to figure out what image those numbers are encoding. The rules are simple: A number on a column or row means that somewhere in that column or row, that man...
You are locked in a massive fortress, slowly starving to death. Your guards inform you that there is food in the fortress, and even tell you where it is and provide a map of the building. However, you are not sure that you can actually reach the food, given that the every door is locked, and every room is its own labyr...
Write a program that sorts a vector of numbers (or any type of element) that looks like having one or more bugs, but it is actually ok. The code must be clear. Someone looking over the code must easily identify that it is a sort algorithm and must easily confuse a correct piece of code with a bug. The (apparent) bug c...
I find it deeply weird that this is possible in Ruby (I won't immediately say how): obj = #code redacted print obj.state # Some value. LValue = obj print obj.state # Different value! Your challenge is to create code roughly of this form. Create an object and assign it to a variable. It should have some defined attr...
Your goal: to write a piece of code that will result in the classic result of "Hello, world!" being printed to STDOUT or equivalent. Rules: Code must be entirely in printing ASCII. All code must be functional - removal of any single counting character must change the result or cause the code to not function. All variab...
Fast Trigonometry Calculations Your task is to create a program which can calculate the sine, cosine and tangent of an angle in degrees. Rules No built-in trigonometry functions (not even secant, cosecant and cotangent if your language has them). You may use lookup tables, but their total size must not exceed 3000 mem...
Task Build a calculator, that takes any string, from a file, stdin or whatever, and adds up all the values of the chars. Example Input Hello World! Output 1085 Rules The calculator needs to accept just ASCII encoding. The shortest code wins. Notes Regarding to the comment of m.buettner, I need to say, I didn't though...
Your task is to calculate the square root of a positive integer without using any mathematical operators to change the number, such as: Setting a variable (ex. squareRoot = 5) Addition (A+B) Subtraction (A-B) Multiplication (A*B) Division (A/B) Square, cube, fourth, etc. roots Exponents Comparison operators (such as ...
Introduction The Fibonacci Linear Feedback Shift Register (LFSR) is a digital circuit which generates a stream of random-looking bits. It consists of several 1-bit flip-flops in a row, with certain positions designated as 'tapped'. In each iteration, the values in the tapped positions are XORed together (i.e., summed...
What is the shortest way to check if two or more variables are equal to 0 in JavaScript? I'm curious to know if there's something shorter than if(!x&&!y&&!z){...}.
Write a program that processes an ASCII art representation of a tangled string and decides whether or not it can be untangled into a simple loop. The tangle is represented using the characters - and | to represent horizontal and vertical segments, and + to represent corners. Places where the string passes over itself a...
Some time ago I came across a game called Ubongo. The player got four shapes and has to put them together in a way, that the shapes form the shape of the board. One example is this: Note that the shapes can be turned or rotated. Your goal is to write a programm that takes the board and the 4 shapes as parameter (comma...
The challenge is to write a solver for the classic pencil and paper game Dots and Boxes . Your code should take two integers m and n as input which specifies the size of the board. Starting with an empty grid of dots, players take turns, adding a single horizontal or vertical line between two unjoined adjacent do...
Often, I find myself running a script or query that will take a significant amount of time to run. I can leave that script open and enjoy some guilt-free procrastination. Now, what if I could write a script that seems to be one of the above scripts to any onlookers, but in looks only? I could put it up on a screen an...
My Problem At my current place of employment, I single-handedly (ok dual-handedly because I'm missing no limbs) maintain approximately 700 laptops. Due to the nature and frequency of their use, I often find they are returned with a bit of damage. For this problem, my primary concern is when a laptop is returned with a ...
There have been a few square root challenges lately, but I think this one is different. Challenge Find an algorithm such that the worst case time complexity is proportional to n^2 and the best case is proportional to n where n is the size of the algorithm input. Given a value x, find the approximate square root of x b...
Me thinks there aren't enough easy questions on here that beginners can attempt! The challenge: Given a random input string of 1's and 0's such as: 10101110101010010100010001010110101001010 Write the shortest code that outputs the bit-wise inverse like so: 01010001010101101011101110101001010110101
The Story: Once upon a time there was a curious Knight that lived on a never used chessboard in the Realm, an antique store. He spent all his career over there and when it came the moment of the retirement he decided to satisfy the wish of all his life: to explore the whole world. Unfortunately his horse was the most l...
Given an mxm chess board, find a minimum number of pieces of the given kind and place them on a chess board in such a way that all squares are either occupied or attacked by at least one piece. Input The input consists of two parameters: m, the number of squares on each side; and a letter which indicates which piece to...
A palindrome is a string that is the same forwards and backwards, such as "racecar". Write a program in some language L, that takes any program P1 in language L as input, and outputs a palindromic program P2 in language L that does the same thing as P1. You do not need to worry about handling input programs with syntax...
The challenge: Write a function, that delivers following output: "1 2 3 4 5 4 3 2 1". Kids stuff? Of course. But here's the point: You only can use: 1 for loop, 2 int variables. You must not use: IF terms, another function, ... Do not hardcode the output There are also some more restrictions to make this harder: No ...
The challenge is programming a program that prints following lyrics of Louis Armstrong's What A Wonderful World with as few characters as possible. The key is obviously kind of a 'compression'. I encourage to use and enhance ideas of previous answers, but please declare if you do so! Rules: No information can be stored...
Challenge I'm sure you read the title, and came in to farm your rep, thinking its kids' stuff, but think again! You have to challenge each other in the shortest code to count the occurences of a string in another. For example, given the following input: aaaabbbbsssffhd as a string, and the string s should output ...
The goal is to write a simple "99 Bottles of Beer" program .. that is valid in at least 2 distinct languages (e.g. not Python 2 and Python 3). It must be a complete file that will run or compile. Interesting answers should be up-voted, but compactness also counts. (Of course, language diversity is the main goal.) EDIT:...
Here is one more "Challenge"! Today i had a meeting with a friend, and mostly we are a little bit crazy.. He bets, that it is not possible to create a Fibonacci Sequence without using loops. No static output like: return "1, 2, 3, 5, 8, 13, .."; GOAL / Requirements Use only 1 int var Return the first 5 (or more) num...
Write a program with length n that outputs another program whose length is the next Fibonacci number after n. The new program must do the same thing - output another program whose length is the next Fibonacci number, etc. n itself (the original program's length) does not have to be a Fibonacci number, although it would...
You have been hired for your tech knowledge as a Secret Agent's sidekick to ensure that the good guy can get his job done and the world can be saved. This is your last mission before retiring with a high paycheck and the gratitude of the whole world. But before you have to disarm the Evil Genius' Big Overly Massive BOM...
This is inspired by a real world problem I had. I'm curious to see if there is any clever way to go about this. You are given two unsorted arrays, A and B, each containing an arbitrary number of floats. A and B don't necessarily have the same lengths. Write a function that takes the elements of A sequentially and finds...
The mission As is well known, the genetic material of all known creatures on Earth is encoded in DNA; using the four nucleotides adenine, thymine, cytosine, and guanine. (Commonly represented by ATGC). A bioinformaticist wishing to store an entire genome would of course not want to store this as ASCII, because each cho...
Given a list of strings, sort the list as numbers without knowing what base is used. The values of the digits are also unknown (it is possible that '1' > '2'). Since the values of digits are unknown, use Benford's Law (or First Digit's Law) to determine the relative value of the digits. For distributions that follow Be...
Write a script that works fine when a blank line is present in the flow of program logic, but breaks or causes unexpected behaviour when that line is removed. Avoid standard loopholes and stupid answers. Your program should do something "useful," even if all it does is add a few integers. Removing an empty line from a ...
Recently at the newly released Puzzling.SE, there was a problem about spies throwing stones into a river that was actually quite challenging: Two spies must pass each other two secret numbers (one number per spy), unnoticed by their enemies. They have agreed on a method for doing this using only 26 indistinguishable s...