text
stringlengths
180
608k
[Question] [ The [International Standard Atmosphere](https://en.wikipedia.org/wiki/International_Standard_Atmosphere) (ISA) is a model of the Earth's atmosphere at "reference" conditions. It includes information on pressure, temperature, and density change vs. altitude. The ISA tabulates these properties at vario...
[Question] [ **This question already has answers here**: [Recognise Stack Exchange Sites by Their Icon](/questions/42242/recognise-stack-exchange-sites-by-their-icon) (5 answers) Closed 8 years ago. Currently, the Stack Exchange network has nearly 150 sites. These sites are as follows: ``` Computer Graphic...
[Question] [ When manufacturing chips, circular silicon wafers are cut into dies of needed size: ![wafer](https://upload.wikimedia.org/wikipedia/commons/d/d7/Wafer_2_Zoll_bis_8_Zoll_2.jpg) The goal of this challenge is maximizing the number of whole dies that can be cut from a wafer of a given diameter. The machi...
[Question] [ EDIT: I posted this question searching for a beautiful, original solution to this problem. Therefore, I accepted a user's edited category "popularity-contest". **Making this a search for optimal solutions (i.e. runtime, code size etc.) is not my intention**. ## Copy-paste master John wants to write t...
[Question] [ This question is from a programming challenge (not DARPA) which has ended. A sheet of paper consists of message, which has been shredded into vertical strips. Given the vertical strips and a dictionary of valid words, the goal is to put together the original message. The vertical strips contain only...
[Question] [ Imagine bytes in memory for an RGB image--R and G and B represented by bytes in sequence. If an image is NxM then the memory layout will be M repetitions for vertical scanlines of 3\*N bytes in sequence for the horizontal pixels. (As one might expect.) A mandate has come down from on high that you ne...
[Question] [ What general tips do you have for golfing in [LiveScript](http://livescript.net/)? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to LiveScript (e.g. "remove comments" is not an answer). Please post one tip per answer. [Answer] # ...
[Question] [ Your task is to hide a small message or string inside a larger block of text. To do so, you must hide the message as capital letters inside the larger For the quoted test: > > Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut convallis porta varius. Donec lo**B**ortis adipiscing dolor ac...
[Question] [ **Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers. --- Closed 10 years ago. * **General programming questions** are off-topic here, but can be asked on [Stack Overflow](http://stackoverflow.com/about). * Questions without an **objective prim...
[Question] [ Given a file named `hello_world` that contains 2-100 bytes of printable ASCII, create a Turing-complete language in which `hello_world` is a valid program that prints "Hello World!". The output should be two files: a compiler or interpreter, and a text file with the language spec. **Rules** * Shortes...
[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/6820/edit). Closed 4 years ago. [Improve this question](/posts/6820/edit) ...
[Question] [ Interpret a triple of 32-bit integers as a vector of 32 integers modulo 5. Write an addition routine for these vectors. **Example**: ``` def add32((a0,a1,a2),(b0,b1,b2)): c0 = c1 = c2 = 0 m = 1 for i in range(32): a = ((a0//m)&1) + 2*((a1//m)&1) + 4*((a2//m)&1) b = ((b0/...
[Question] [ ## Background Often, when storing a number in binary with some maximum, we simply round the maximum to the next power of two then allocate the number of bits nececairy to store the whole range. Lets call the result of this method \$S(x, m)\$ where x is the number and m is the maximum. While not bad, ...
[Question] [ Consider an \$n \times n\$ grid of integers. The task is to draw a straight line across the grid so that the part that includes the top left corner sums to the largest number possible. Here is a picture of an optimal solution with score 45: [![enter image description here](https://i.stack.imgur.com/O...
[Question] [ Digital sum, DR, Digit root is the iterative process of summing digits of a number until you end up with a single digit root number: e.g. digit root of 12345 is 6 since 1 + 2 + 3 + 4 + 5 = 15 = 1+5. Also look at [Digit root challenge](https://codegolf.stackexchange.com/questions/97713/print-the-digit...
[Question] [ [Robbers thread](https://codegolf.stackexchange.com/questions/243504/hello-shue-robbers) In this [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") challenge, your task is to write a program `h` that outputs "Hello Shue!". Next, you have to choose a stri...
[Question] [ ### Background This is a follow up question to the question: [Will the Hydra finally die?](https://codegolf.stackexchange.com/questions/230778/will-the-hydra-finally-die/230992#230992) As before a dangerous A Medusa have released a dangerous Hydra which is revived unless the exact number of heads it ...
[Question] [ What tips do you have for code-golfing in the [V lang](https://vlang.io/)? I have been trying to find ways to shorten codegolfs on there but can't find any resources on it. Do you guys have any? Please suggest tips that are at least somewhat specific to the V programming language (e.g. "remove commen...
[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/223372/edit). Closed 2 years ago. [Improve this question](/posts/223372/edi...
[Question] [ **Challenge** Given a 2D array, find the length and direction of all the longest consecutive characters. * If there are ties, output *every* possible winning combination in any order, (winners can overlap with other winners) * Zero "0" is a special padding character which cannot be a winner. * Code g...
[Question] [ Here's yet another Steenrod algebra question. Summary of the algorithm: I have a procedure that replaces a list of positive integers with a list of lists of positive integers. You need to repeatedly map this procedure over a list of lists and flatten the output until you reach a fixed point. Then for...
[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/184937/edit). Closed 4 years ago. [Improve this question](/posts/184937/edi...
[Question] [ If you have any tips regarding golfing in [Sesos](https://github.com/DennisMitchell/sesos), a language made by [Dennis](https://codegolf.stackexchange.com/users/12012/dennis), and nobody else has covered them yet, please post them here! Only one tip is allowed per answer. Your tip should be at least ...
[Question] [ Codegolf the [hamming code](https://oeis.org/A075926) (with distance equals 3)! The sequence looks like this: 0, 7, 25, 30, 42, 45, 51, 52, 75, 76, 82, 85, 97, 102, 120, 127, 385, 390, 408, 415, 427, 428, 434, 437, 458, 461, 467, 468, 480, 487, 505, 510, 642, 645, 667, 668, 680... ## Task Given `n` ...
[Question] [ *EDITS*: * Added link to the plain-text (multiple strings) test data * Added BLANK,EDGE and TIE2 test cases (see Test Data section) (11/25) * Updated the JSON test cases (some lines were ill-formatted) (11/24) [![Renju match gone bad !](https://i.stack.imgur.com/5AqId.jpg)](https://i.stack.imgur.com...
[Question] [ This challenge is based upon three sequences, below are their formulae: * [Recamán's sequence:](https://oeis.org/A005132) > > > > > > a1 = 0; for n > 0, an = an-1 - n > > > > > > > > > if positive and not already in the sequence, otherwise > > > > > > > an = an-1 + n > > > > > > > > ...
[Question] [ Given a string of text that contains lowercase letters, encode it as follows: (I will be using `abcdef`) * First, encode the [alphabet cipher](https://codegolf.stackexchange.com/questions/97859/encode-the-alphabet-cipher), but this time, 0-indexed. `000102030405` * Reverse it. `504030201000` * Loop t...
[Question] [ Air balloons need a gas that is lighter than air. However, hydrogen is flammable, while helium is [not sustainable](https://en.wikipedia.org/wiki/Helium#Conservation_advocates), so we need a replacement! You must write code that determines whether any given gas is lighter than air. --- Input: a [mole...
[Question] [ First challenge! # What is an ambigram? Ambigrams are word(s) that read the same word(s) or another word given a certain transformation and possibly stylistic alterations. Example: [![enter image description here](https://i.stack.imgur.com/0eHn9.png)](https://i.stack.imgur.com/0eHn9.png) That's an ex...
[Question] [ Consider a function plot like this: ``` ########### ################# #################### ...
[Question] [ **This question already has answers here**: [Print this Multiplication Table](/questions/11305/print-this-multiplication-table) (69 answers) Closed 9 years ago. This javascript code: `for(x=1;x<6;x++)for(y=1;y<6;y++)console.log((y==1?'\n':'')+x+'*'+y+'='+x*y);` prints the following: ``` 1*1=1 ...
[Question] [ I want a program that outputs "hello world" on console on my x86\_64 based Linux computer. Yes, a complete program, not something silly that needs an interpreter or a compiler to work. You may: * use all glibc functionality * submit a static executable * submit a dynamic executable with dependencies...
[Question] [ **This question already has answers here**: Closed 11 years ago. > > **Possible Duplicate:** > > [Holiday Gift Exchange](https://codegolf.stackexchange.com/questions/838/holiday-gift-exchange) > > > **Background:** Secret Santa is a Western Christmas tradition in which members of a group ...
[Question] [ Given a string, find the 10 least common alpha-numeric characters within that string. Output should be formatted with numbers left-padded with spaces so they look like this: ``` e: 1 t: 16 c: 42 b: 400 z: 50000 a: 100000 ``` Use this to test your program: [here](https://codegolf.stac...
[Question] [ **Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers. --- Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win. Closed 1 year ago. [Improve this ques...
[Question] [ **Closed**. This question is [opinion-based](/help/closed-questions). It is not currently accepting answers. --- **Want to improve this question?** Update the question so it can be answered with facts and citations by [editing this post](/posts/5359/edit). Closed 1 year ago. [Improve this questio...
[Question] [ Given an expression of one-letter variables (`[a-z]`), operators (`*, +, &`) and parenthesis, expand it using the following axioms: ``` a * b != b * a a * b * c = (a * b) * c = a * (b * c) a + b = b + a a + b + c = (a + b) + c = a + (b + c) a * (b + c) = a * b + a * c a & b = b & a a & (b + c) = a & ...
[Question] [ **This question already has answers here**: [Implement the Torian](/questions/231274/implement-the-torian) (22 answers) Closed 2 years ago. ## Introduction Factorials are one of the most frequently used examples to show how a programming language works. A factorial, denoted \$n!\$, is \$1⋅2⋅3⋅...
[Question] [ When encountering a problem whose input is meant to be read sequentially, *but you may also want to push back onto the input like a stack*, which languages have the optimal boilerplates for doing so, and how? For example, from [Create a Boolean Calculator](https://codegolf.stackexchange.com/questions...
[Question] [ # Introduction I crochet a lot, and lately I've started writing crochet patterns. However, while I work very well from notes such as *rnds 2-6 (round number = x, original number of stitches = y): \*dc x-2 stitches, 2 dc in next stitch\* around (xy stitches)*, most published patterns spell out each ro...
[Question] [ # Challenge ## Premise I've got multiple pretty numbers all in a row. Each is a decimal digit. 0s are weakly attracted to 0s, 1s are attracted to 1s a little more strongly and so on until 9. I don't know *why* — it must be something I ate. As a result, a sort of two-way sideways sedimentation occurs ...
[Question] [ [Pure data](https://puredata.info/) is a graphical programming language designed for audio processing. This makes it unsuitable for most general programming but especially unsuitable for [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"). It would then be nice to have a [tip...
[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/197117/edit). Closed 4 years ago. [Improve this question](/posts/197117/edi...
[Question] [ You are given two arbitrary integer lists, e.g. `[-10, 99, -6, 43]`, `[100, 32, 44]`. You are to pick one integer from each list and sum them up, then sort the best pairs ordered by the absolute distance to 100 in ascending order. Paired up integers from each list shall not be repeated in the output....
[Question] [ (Note: I'm not in the army so feel free to correct me if my formation is wrong, but I will not be changing the question. I will change any terminology mistakes though, because I'm trying to avoid air-cadet-specific wording choices) (Note: this follows the standards for Canadian Air Cadets, not any ac...
[Question] [ ## Introduction *Don't worry - no knowledge in mathematics is needed. It is possible to just skip the motivation part, but I think it is nice if a puzzle has a background story. Since the title contains the number* I *there will be more puzzles of this kind, if you like them. Feedback is highly appre...
[Question] [ **This question already has answers here**: [Reversible hex dump utility (aka `xxd`)](/questions/11985/reversible-hex-dump-utility-aka-xxd) (4 answers) Closed 7 years ago. Given an `xxd` hexdump such as this one: ``` 00000000: 1f8b 0808 4920 2258 0003 7069 6c6c 6f77 ....I "X..pillow 00000010:...
[Question] [ Given two words and a list as input, your program must (in as few characters as possible, of course) find the shortest way to "chain" the first word to the last using the ones in the list. Two words are "chained" if their first and last letters are the same, e.g. "Food" and "Door". Your program will ...
[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/80218/edit). Closed 7 years ago. [Improve this question](/posts/80218/edit)...
[Question] [ You live in a rectangular neighborhood which is completely partitioned into N rectangular plots, i.e. there are no gaps or overlaps. Plots do not necessarily have the same width/height as other plots. All widths/heights are positive integers. Your goal is to output all shared edges between plots. # I...
[Question] [ **This question already has answers here**: [Golf Me An OOP!](/questions/61097/golf-me-an-oop) (4 answers) Closed 8 years ago. I've been around for a while, watching you golf and I really enjoy it. I came up with a challenge for you all so let's begin! # Challenge *I assume that everyone knows...
[Question] [ **Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers. --- **Want to improve this question?** Update the question so it focuses on one problem only by [editing this post](/posts/65264/edit). Closed 8 years ago. [Improve this question](...
[Question] [ Blade is a PHP templating engine. For this challenge, you only need to implement a modified version one feature -- text replacement. ## Challenge Description Given an input file and a map of keys to their replacements, write an interpreter that reads through the file to find double open braces (`{{`)...
[Question] [ ![](https://i.stack.imgur.com/eJ0TF.png) This challenge is inspired by [dmenu](http://tools.suckless.org/dmenu/), the program I use to launch other programs on my Linux box. To start, for example, GIMP, I simply hit the keyboard shortcut I have assigned to dmenu, type "gimp" and hit enter. However, I...
[Question] [ ## Iterated Function Systems An [Iterated Function System](http://en.wikipedia.org/wiki/Iterated_function_system) (IFS) is a method of constructing self-similar fractals. Each fractal is defined recursively as the union of several copies of itself, with each copy obtained by applying a transformation...
[Question] [ Recently, when doing some code-golf challenge, I came up with with two solutions, in 69 and 105 bytes. [It's a remarkable coincidence](http://en.wikipedia.org/wiki/69_%28number%29), because: * 69 (decimal) = 105 (octal) * 69 (hexadecimal) = 105 (decimal) What other numbers have this property (using d...
[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/35705/edit). Closed 9 years ago. [Improve this question](/posts/35705/edit)...
[Question] [ The popular `.bz2` compression format is used to store all sorts of things. One of the more interesting features is that it consists of several independently decompressible blocks, allowing recovery of partial segments if the file is damaged. The `bzip2recover` program, included with `bzip2`, allows ...
[Question] [ ## 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 to...
[Question] [ 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 [he...
[Question] [ Code-golfing is incredibly fun to do, trying to solve the given problem is one thing but the real challenge is getting your code as short as possible. Some languages are perfect for golfing because of their short commands, sadly Delphi isn't one of them. I'm looking for tips that are useful for golfi...
[Question] [ Write a program that takes a list of n space-separated integers, and outputs a permutation of that list using a maximum of 2\*n comparisons. It should loop this until an empty line is input. Alternatively, it can accept inputs until an empty line is given, then output all the permutations. Though you...
[Question] [ **Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers. --- Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win. Closed 9 years ago. [Improve this que...
[Question] [ ## Task > > Make a complete program or a function which calculates sum of all temperatures which, when written in [Celsius](http://en.wikipedia.org/wiki/Celsius) and [Fahrenheit](http://en.wikipedia.org/wiki/Fahrenheit) scale, are [anagram](http://en.wikipedia.org/wiki/Anagram) of each other. > > ...
[Question] [ ## Challenge You are to write the shortest complete program that takes a string as input from STDIN and decomposes it as far as possible, and prints the composition to STDOUT. To decompose a string, your program finds a substring (of length greater than 1) within the original string, the repetitions ...
[Question] [ I'd be interested to see who can come up with the fastest function to produce multiplication tables, in the following format: ``` 1 2 3 4 5 6 7 8 9 10 11 12 2 4 6 8 10 12 14 16 18 20 22 24 3 6 9 12 15 18 21 24 27 30 33 36 4 8 12 16 20 24...
[Question] [ *This is a sequel to [Ragged list pattern matching](https://codegolf.stackexchange.com/questions/246280/ragged-list-pattern-matching). In this challenge, the wildcard may match a sequence of items of any length instead of just a single item.* Given a pattern and a ragged list of integers, your task i...
[Question] [ [Nerdle](https://www.nerdlegame.com/) is a Wordle variant, in which instead of words, the answers are equations. Each equation entered in the game must be a valid one. Examples: `13³-1=2196`, `(1/1)²*8=8`, `(((3)))²=9` The task is to generate and output to a .txt file, one equation per line, all poss...
[Question] [ Given an integer \$n > 1\$, output a balanced binary tree with \$n\$ leaf nodes. The tree should be constructed out of (space), `\` and `/` (slashes). Each slash represents a branch. * A node is represented by adjacent slashes: `/\`. There must be a root node at the top of the tree (i.e. the first r...
[Question] [ ## Synopsis Your goal is to implement the (asymptotically) fastest growing function within bounded code on a fictional CPU utilizing a quite limited, yet (probably) turing-complete instruction set. ## Environment The CPU utilizes unbounded RAM as well as two registers, the accumulator A and the progr...
[Question] [ # Inputs: The program or function should take 2 vector-like (e.g. a list of numbers) O and V of the same number of dimensions, and a number T (all floating-point numbers or similar) ### Constraints: * T >= 0 * All elements of Vector O will be in the range `[0,1)` # Output: The program or function sho...
[Question] [ On CodingGame, there is a [Puzzle](https://www.codingame.com/ide/puzzle/ascii-art "Coding-game ascii art Puzzle") that ask to write words with ascii art. I solve the puzzle then tried to golf it. What improvement can I do on it? ``` INPUT >>> 20 >>> 11 >>> MANHATTAN >>> .----------------. .------...
[Question] [ Given: a width, a height, and a set of sets of points. Output: An image where each set of points is connected and colored in (like a shape). Each shape *must* be a different color from all of the other shapes, but **the actual color doesn't matter as long as each color is distinct**. The shapes must ...
[Question] [ For functions \$f, g: \{0,1\}^n \rightarrow \{0,1\} \$, we say \$f \sim g\$ if there's a permutation of \$1,2,3,...,n\$ called \$i\_1,i\_2,i\_3,...,i\_n\$ so that \$f(x\_1,x\_2,x\_3,...,x\_n) = g(x\_{i\_1},x\_{i\_2},x\_{i\_3},...,x\_{i\_n})\$. Therefore, all such functions are divided in several sets...
[Question] [ **Related:** * [Determine the position of a non-negative number in the infinite spiral](https://codegolf.stackexchange.com/questions/87178/determine-the-position-of-a-non-negative-number-in-the-infinite-spiral) * [Wind me a number snake!](https://codegolf.stackexchange.com/questions/125966/wind-me-a-...
[Question] [ Given a double-precision float, find the closest double-precision float whose binary representation is a palindrome. # Input A floating point number `x`. You may use any format you like for input, but the format you chose must be able to represent every possible IEEE 754 binary64 value, including den...
[Question] [ **Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers. --- **Want to improve this question?** Update the question so it focuses on one problem only by [editing this post](/posts/126507/edit). Closed 6 years ago. [Improve this question]...
[Question] [ A [Ken Thompson virus](http://wiki.c2.com/?TheKenThompsonHack) is a virus that infects your compiler and other programs. Since it infects all your tools, you can not detect it without using tools from before the virus was introduced. Your will create a prototype for inserting the Ken Thompson virus i...
[Question] [ (yes, that title was intentional) Your task is to correct common grammatical mistakes. You must: * Capitalise the first letter of each sentence, ie the first non-whitespace letter after any of `.!?` and, additionally, capitalise the first letter of the input * Remove repeating punctuation, such as `!...
[Question] [ Your challenge is to query the SE API and find out whose rep on PPCG is tied, and output it. If these were all the users on PPCG: ``` Martin Ender: 10000 rep Dennis: 10000 rep xnor: 5000 rep sp3000: 3000 rep ``` You should output `Martin Ender, Dennis`. If these were the only users: ``` Jon Skeet: 10...
[Question] [ The task is to create a program (or a function), which outputs array elements in the order, determined by two numbers **F** and **B**. **F** is number of elements to print, **B** is the rollback distance (from last printed element). Each element must be printed on separate line and blank line must be...
[Question] [ # String Similarity String similarity is basically a ratio of how similar one string is to another. This can be calculated in many ways, and there are various algorithms out there for implementing a ratio calculation for string similarity, some being more accurate than others. It's actually very usef...
[Question] [ # Challenge Your program will take in a string from **stdin**, and output multiple lines to **stdout**. An example of input looks like this: My favorite Chipotle order: > > B1113YNNY > > > Let's break it down: * The first character is either A (burrito), or B (burrito bowl). * The second charact...
[Question] [ **Uptime** is a very important metric, as we all know, so we'd like to measure the uptime since our service was first launched. The SLA specifies an uptime of a certain number of nines, such as 3 nines for at least `99.9%` uptime, or 1 nine for at least `90%` uptime, and you're wondering if you've ac...
[Question] [ **Pre-Note** Because of popular demand, and to avoid disqualifying certain languages, the dictionary can now be provided as input parameter. # Intro Given a dictionary of words, you should write an autocomplete program or function. # Autocompletion *"Autocomplete, or word completion, is a feature i...
[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/77526/edit). Closed 7 years ago. [Improve this question](/posts/77526/edit)...
[Question] [ Some of you may have heard of the Wargame series of computer based real time strategy game. These games pit teams of players with primarily cold war era units to see how a hot cold war would have played out. The goal of this challenge is to simulate a tank battle in these games. **Input** * Two "tank...
[Question] [ # Symbolic Differentiation 2: Back on the Chain Gang ## Task Write a program that takes in a certain sort of function from stdin and differentiates it with respect to *x*, using the chain rule.\* The input function will be a string of the following form: ``` "trig_1 trig_2 trig_3 ... x" ``` where `tr...
[Question] [ [Pike](http://pike.lysator.liu.se) is a dynamically typed interpreted scripting language, heavily influenced by C, which typically compiles to C99 with a few `#define`s. (It even has a preprocessor!) What general tips do you have for golfing in Pike? I'm looking for ideas that can be applied to code ...
[Question] [ ## The Scenario I am building a fancy oscilloscope but I need your help. The oscilloscope can display any number of individual waveforms at the same time (e.g. sine waves) but I don't know how to synchronise the display so it doesn't jump around too much. ## The Challenge Your program or function wil...
[Question] [ My fifth-grade daughter is learning about codes and ciphers. She has reached the point of decoding a ciphertext that has been encoded with the Caesar cipher where the offset is not provided in advance. Without computers this can be time-consuming, especially for long blocks of text. Luckily, we do ha...
[Question] [ You work for the military as a coder and are responsible for writing software to control missiles. Your task is to write a program or function that will output a code sequence (any length ASCII string) to launch a missile. The program should be based on a loop taking the code sequence from memory and...
[Question] [ # Introduction You may remember *sudoku*, where there can only be one of each number in each row, column and block of nine. The general idea is that if the array contains but one element, you can submit that as a deterministic solution. If there are already filtered arrays (by rows, columns and 3×3 b...
[Question] [ tl;dr [True] Billy got a Stack Overflow pen from Tim Post. Billy was stupid enough to *use* the pen, knowing that he was not worthy. Billy's friend took the pen apart, so Billy put the pen in a drawer at his house, hoping he would eventually fix it. A year later, Billy can only find half of the pen's...
[Question] [ Your challenge is, given a series of notes, print the fingerings that minimize the amount of movements you need to make (explained below). My not standard way of transforming fingerings to text: The `|` line separates the left and right hand. Use `1` for the index finger, `2` for the middle finger an...
[Question] [ In investing, internal rate of return (IRR), the continuously compounded rate of return economically equivalent to a specified series of cashflows, is often a valuable concept. Your challenge is to demonstrate how to compute IRR in the language of your choice in as few bytes as possible, subject to t...
[Question] [ Given an `m`x`m` 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 wh...
[Question] [ This challenge challenges you to write a function that will take as its argument an array that specifies the types of input, an optional prompt, and a verification key; inputs and validates the values; and returns them. Input types: > > b - Boolean values. > > c - Characters. > > i - Integer...
[Question] [ **Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers. --- Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win. Closed 8 years ago. [Improve this que...
[Question] [ **Scenario** Little Johnny wants to play with his friends today. But his babysitter won't let him go! After a lot of begging, the heartless nanny gives him her brand new electronic puzzle and says: "If you solve the puzzle then you are free to go". Not being aware of Little Johnny's IT skills, the na...