text
stringlengths
180
608k
[Question] [ # Introduction A disk is a linear container with blocks indexed `0` through `size-1`. A file is a named list of block indexes used by that file. An example filesystem is expressed like this: ``` 15 ALPHA=3,5 BETA=11,10,7 ``` "The disk has 15 blocks, the first block of file ALPHA is the disk block at in...
[Question] [ Write a program or function that takes in a nonempty single-line string of [printable ascii](https://en.wikipedia.org/wiki/ASCII#Printable_characters) characters excluding space: ``` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ``` You may assume the in...
[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/55807/edit). Closed 6 years ago. [Improve this question](/posts/55807/edit) ...
[Question] [ I'm attempting to solve a *programming golf* style *programming puzzle*. I need to write an 18 character phrase in [Chef](http://www.dangermouse.net/esoteric/chef.html) in less than 32 "lines" of code. In this case, a line counts as an ingredient or an instruction. The most straightforward way of doing...
[Question] [ Given the input of `n` and `value`. The code is supposed to nest the single element list with `value` repeated `n` times. The final output should be a multilevel nested list with single repeated values in all sublists. This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'")...
[Question] [ Create a program that, given a name as input, will generate a Valentine’s day greeting card featuring that name, with its source code also having a Valentine’s day theme. The greeting can be either ASCII art or a generated picture. Additional conditions: * The source code has to **look** like something...
[Question] [ **The accepted winner is isaacg, with his [7-bit ASCII answer](https://codegolf.stackexchange.com/a/48583/38891).** However, the challenge isn't over yet - this bounty is awarded to the shortest answer. If, *somehow*, you get all the first characters of all the other answers down into 10 bytes, you wil...
[Question] [ **Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. The challenge: > > Generate a random sequence of numbers. The only input should be the length of ...
[Question] [ Let's say I'm ten steps away from my destination. I walk there following the old saying, "Two steps forward and one step back". I take two steps forward, one back, until I'm standing exactly on my destination. (This might involve stepping past my destination, and returning to it). How many steps did I ...
[Question] [ ## Challenge Given an array of integers, received from stdin, function arguments, program arguments, or some other method: Output *only* the minimum and maximum numbers in the array, through a return value, stdout, or other fitting methods. ## Example session ``` > minmax( {0, 15, 2, 3, 7, 18, -2, 9, 6...
[Question] [ *This is the cops' thread. The robbers' thread is [here](https://codegolf.stackexchange.com/q/137743/61563).* Your challenge is to write a program or function that, with a certain input, prints the exact string `Hello, World!` and a newline. Capitalization, spacing and punctuation must be exact. Input ...
[Question] [ **This question already has answers here**: [Counting in bijective base 62](/questions/79304/counting-in-bijective-base-62) (19 answers) Closed 6 years ago. Zeroless numbers are numbers that do not contain **0** as one of their decimal digits. Given an integer **K**, return the **K**th zeroless ...
[Question] [ # Intro Given radius \$r\$, draw a circle in the center of the screen. [Sandbox.](https://codegolf.meta.stackexchange.com/a/19221/80214) # The Challenge Here is a simple challenge. Plot a circle using the formula \$x^2+y^2=r^2\$, or any other formula that will plot a circle according to the given param...
[Question] [ You must fill an array with every number from `0-n` inclusive. No numbers should repeat. However they must be in a random order. # Rules All standard [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") rules and standard loopholes are banned The array must be generated pseudo-r...
[Question] [ # Task Write a program/function that when given three 2d points in [cartesian coordinates](https://en.wikipedia.org/wiki/Cartesian_coordinate_system) as input outputs a truthy value if they are [collinear](https://en.wikipedia.org/wiki/Collinearity) otherwise a falsey value Three points are said to be ...
[Question] [ ### *Find the original challenge [here](https://codegolf.stackexchange.com/questions/120897/how-long-is-my-number)* ## Challenge Given an integer, `Z` in the range `-2^31 < Z < 2^31`, output the number of digits in that number (in base 10). ## Rules You must not use any string functions (in the case of...
[Question] [ ## Introduction Just on Hacker news, John Resig contemplates transforming a query “foo=1&foo=2&foo=3&blah=a&blah=b” into one that looks like this: “foo=1,2,3&blah=a,b", <https://johnresig.com/blog/search-and-dont-replace/>. He claims "being 10 lines shorter than Mark’s solution". Query strings consist ...
[Question] [ Your program has to print out a number of spaces, followed by a dot and a newline. The number of spaces is the x position of your dot defined with 0 < x < 30 Every new line is a turn. Your program runs for 30 turns. Your program starts with a random x position and every turn shifts this position random...
[Question] [ Relatable scenario: I'm going to the store to buy a single item, but only have a $100k bill. As a result, I need exactly $99,979 in change, and in the fewest coins/bills possible because I'm quite obviously a very practical person. The denominations of these coins/bills follow the [hyperinflation seque...
[Question] [ *[Related](https://codegolf.stackexchange.com/questions/15934/find-a-fractions-position-in-the-stern-brocot-tree)* From [Wikipedia](https://en.wikipedia.org/wiki/Calkin%E2%80%93Wilf_tree): > > In number theory, the Calkin–Wilf tree is a tree in which the vertices correspond one-to-one to the positive ...
[Question] [ This is a [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") puzzle, the cops' thread can be found [here.](https://codegolf.stackexchange.com/questions/107012/hidden-inversions-cops-thread) Your task will be to find an anagram of the provided programs in t...
[Question] [ ### Introduction The [sign](https://en.wikipedia.org/wiki/Sign_(mathematics)) of a number is either a `+`, or a `-` for every non-zero integer. Zero itself is signless (`+0` is the same as `-0`). In the following sequence, we are going to alternate between the **positive sign**, the **zero** and the **...
[Question] [ Given a string consisting of `()[]{}`, print the paired brackets in the same order as they appear in the string. Any opening bracket `([{` can be paired with any closing bracket `)]}`. For example: ``` ({()[}]] returns: (], {], (), [} ``` # Rules * A string consisting of `()[]{}` should be received a...
[Question] [ ### Introduction A normal checkers board contains 8 x 8 = 64 squares: [![enter image description here](https://i.stack.imgur.com/Z41aH.jpg)](https://i.stack.imgur.com/Z41aH.jpg) You can see that in total, there are **12 white pieces**. Black and white always have the same amount of pieces. If there are...
[Question] [ ## Introduction During work with [BMP (bitmap)](https://en.wikipedia.org/wiki/BMP_file_format) generator I face problem of converting number to little endian hex string. Here is function which I create in JavaScript - but wonder how small code can works similarly ``` let liEnd= num => num.toString(16)....
[Question] [ Given an input string containing only alphanumeric ASCII characters and starting with a letter, swap each letter run with the digit run which follows. A *run* is a sequence of consecutive letters or digits. Note that in the case where the input string ends with a run of letters, this run is left untouc...
[Question] [ A fairly simple challenge: You will receive two inputs, a string and a number (the number may be taken as a string, ie `"123"` instead of `123`) If the string does not end in a number (ie, it does not match the regex `\d$`), just append the number to the end of the string. If the string does end in a n...
[Question] [ A paragraph of text has numbers and alphabetic letters mixed. Your task is to separate the numbers to the left side and the alphabetic letters to the right side in the same order of each line. Rules: 1. Numbers are plain integers; so no decimal point, and no negative/positive signs. 2. Numbers may or ...
[Question] [ **This question already has answers here**: [Mountain range numbers](/questions/199055/mountain-range-numbers) (25 answers) Closed 4 years ago. An ***undulant*** number is a number where its digits alternate between *up* and *down* like the following number: 461902 or 708143, or even 1010101, bu...
[Question] [ Your task, should you choose to accept it, is to take two input values \$a\$ and \$b\$, where \$a\$ and \$b\$ are in the set \$\{T, U, F\}\$, and compute and output their logical conjunction in a [three-valued logic system](https://en.wikipedia.org/wiki/Three-valued_logic#Logics). A three valued logica...
[Question] [ # Loading Circle Animation ## Challenge Write a full program that takes no input (or has an unused input) that displays exactly the following ASCII animation for as long as possible or only 8 frames. Frame 1: ``` # # # # ## ``` Frame 2: ``` ## # # ## ``` Frame 3: ``` ## # # # # ``` Frame 4: ```...
[Question] [ We had a challenge on Multiplicative Persistence [here](https://codegolf.stackexchange.com/questions/181958/multiplicative-persistence). As a recap, to get a multiplicative persistence of a number, do these steps: 1. Multiply all the digits of a number (in base \$10\$) 2. Repeat Step 1 until you have...
[Question] [ The task is to write code to identify which key is pressed on the keyboard. You can assume that only one key is pressed at a time and that there is a standard US keyboard layout. That is the layout with the @ over the 2. Your code should output a unique identifier for any key pressed. This includes Prt...
[Question] [ This challenge is to take an alphabetical string as input and to apply the following conversion: The first of each type of character of the string must stay, and must be immediately followed by an integer representing how many of these characters were in the original string. Any repeating characters mu...
[Question] [ ## Intro/Background I was looking at a Flybuys card at Coles recently and noticed that if I took something like this: ![Flybuys](https://i.stack.imgur.com/zMG2F.jpg) [Source, randomly found on the Internet](http://moneyoff.com.au/images/fly-buys4.jpg) And swapped some words around, I'd get this: ![Buy...
[Question] [ Given a list of integers, create a boolean mask such that the true indices can be used to filter the distinct values from the list. Which index is selected as the true one does not matter as long as only one of them is selected for each set of indices corresponding to identical values. The input will b...
[Question] [ This is an [answer-chaining](/questions/tagged/answer-chaining "show questions tagged 'answer-chaining'") challenge where every part of your answer should aim to be unique from every other answer. This question will work in the following way: * I will post the first answer. The next answer will stem fr...
[Question] [ Inspired by an old manual... ### The challenge I define the *a*th suffix vector of *b* as the boolean list of length *a* with *b* trailing truthy values. Write a program or function that, given *a* and *b* by any means, returns the *a*th suffix vector of *b* by any means. Now this may seem trivial, but...
[Question] [ # Challenge You task for this question is to split an input array of integers on the second occurrence of every integer in that array. **Not clear enough ? Here is an example to help** Input array: ``` [2 1 1 2 3 2 2 4 5 6 7 3 7 0 5] ``` Output: ``` [[2 1] [] [3 2 2 4 5 6 7] [] [0] []] ``` Explanation:...
[Question] [ Given a list of positive integers, partition the list into two sublists such that the absolute value of the difference of the sums over the two sublists is minimal. The output of the program should be the (non-negative) difference of these sums. ## Examples: ``` [1,2,3] -> 0 # [1,2], [3] [2,3,...
[Question] [ For this challenge, we will define the "complement" of a list of integers `A` as being any list `B` such that the union of `A` and `B` is a list of consecutive integers with no repeats. In other words, `B` is the complement of `A` if * `B` has all of the integers between the minimum and maximum of `A` ...
[Question] [ I'd love to take a number and know how many syllables are in it, when spoken in English. Let's limit this to positive integers which are less than one thousand. I'm British, so we're going to follow the hundreds column with an 'and' when there are any non-zero digits after it. # The Challenge * Write s...
[Question] [ A skyline is an array of positive integers where each integer represents how tall a building is. For example, if we had the array `[1,3,4,2,5,3,3]` this would be the skyline in ascii art: ``` # # # ## ### ###### ####### ``` Your task is to find the area of the largest rectangle in the skyline. ...
[Question] [ I was answering one challenge here and this task was part of the challenge. I've got a 73 bytes solution in javascript. But I think it is too much for a simple thing. ### Challenge Given as input two integers: * `N` the length of the expected array * `R` the interval's range starting in one: `1..R`, no...
[Question] [ Surprised that we don't have a symmetric difference challenge yet. Given two lists only containing positive integers, return all items among these two lists that aren't contained in both of the lists. ## Rules From the set definition: > > A set is a collection of definite distinct items. > > > * So...
[Question] [ So we're all hopefully familiar with Spreadsheet 'A1' cell notation. It's simply an alphanumeric representation of the positioning of said cell within a grid. The letter(s) represent the column positioning of the cell, and the number represents the row. The 'letter' part can consist of 1 or more letter...
[Question] [ **Not a dupe to [this](https://codegolf.stackexchange.com/questions/63834/count-up-forever). That question asks *specifically* for counting up forever, while this question allows many other approaches.** Write a program or function which, given infinite time and memory, would print an infinite non-peri...
[Question] [ Your task: write a program/function that when given a string containing only ASCII characters, outputs/returns the string in reverse-ish. **Example:** 1) Input ``` Hello, World! ``` 2) Number unique characters in input. (Input string separated by pipes (`|`) for readability) ``` H|e|l|l|o|,| |W|o|r|l|d...
[Question] [ Input a non-empty array of positive (greater than 0) integers. Output another non-empty array of positive integers which *encode* the input array. Output array does not use any numbers used in the input array. ## Rules * Output array should not contain any numbers used in the input array. + Both input...
[Question] [ A positive integer may be represented in an integer base \$1 \le b < \infty\$. When converted to that base it has some number of distinct digits. Any positive integer in base \$1\$ has \$1\$ distinct digit. Most positive integers in base \$2\$ have \$2\$ distinct digits, the exceptions being those of t...
[Question] [ It's a three players game, play with one hand. At same time, each player show his hand with 0 to 5 fingers extended. If all player show same kind of (even or odd) number, there is no winner. But else, the player showing different kind the two other win. ``` P l a y e r s A B C Winner E...
[Question] [ [SVG](https://en.wikipedia.org/wiki/SVG) is an XML vector graphics markup language embeddable in web content. Your tips should be at least somewhat specific to SVG. Please post one tip per answer. [Answer] # Know your transforms *Note: this answer talks about the implementation of transforms descr...
[Question] [ Implement a function or program which raises `x` to the power of `y`. Inputs are 16-bit signed integers. That is, both are in the range [-32768, 32767]. The output should be in the same range. I chose this range because it should make it possible to do exhaustive testing to ensure all edge-cases are co...
[Question] [ You will be given a nested array. Your program has to visualize the array. --- # But.. How? For example, let's assume we have a nested array, like `[["1","2"],[["1","2"],"3"],"4",[[[["5"]]]],"6"]`. This nested array can be visualised as: ``` ->1 ->2 -->1 -->2 ->3 >4 ---->5 >6 ``` --- # Examples ``` Inp...
[Question] [ > > The challenge involve simply toggling a string within another string. > > > ## Explanation If the **toggle string** is a substring of the **main string**, remove all instances of the **toggle string** from the **main string**; otherwise, append the **toggle string** at the end of the **main str...
[Question] [ Because the coronavirus is still at large, I thought it would be fitting to have a epidemic-themed challenge. ## Challenge You are given a 2D array of people, where `1` represents someone with the virus, and `0` represents someone without the virus. Every day, the people with the virus infect their nei...
[Question] [ What I would like to see is a fractal tree being drawn where the you can input an integer, and the output will be a fractal tree with the entered amount of branch steps. Rules: * The fractal should be a line fractal tree: ![line fractal tree](https://i.stack.imgur.com/WMRSU.gif) * the shape of the frac...
[Question] [ **This question already has answers here**: [Work it harder, make it better](/questions/57549/work-it-harder-make-it-better) (14 answers) Closed 6 years ago. > > Meta discussion: [Is "(The other day) I met a bear" a duplicate?](https://codegolf.meta.stackexchange.com/q/12490/12012) > > > You...
[Question] [ *Adapted from [this](https://stackoverflow.com/questions/70002842/expand-list-of-lists-by-adding-element-once-to-every-list) StackOverflow question* In this challenge you will take a list of lists of integers, e.g. ``` A = [[1,2],[3,4],[5],[]] ``` And an additional single integer (e.g. `n = 7`). If you...
[Question] [ For this challenge, you will be given a long string as an input. With this string, you must create a dictionary. ## Details: This dictionary will contain all the words from the string - a word being any sequence of letters surrounded by non-letter characters (ASCII). Letter case of the entries of the d...
[Question] [ Write a program that takes two numbers as its input. The first one is the number of dimensions - 0 for a dot, 1 for a straight line, 2 for a circle, 3 for a sphere. The second number is the radius of the object, or, if it's 1-dimensional, the number itself. Output 0 for 0 dimensions. The output is the ...
[Question] [ # The challenge Output an array or string representation of Dürer's famous [magic square](https://en.wikipedia.org/wiki/Magic_square#Albrecht_D.C3.BCrer.27s_magic_square): [![enter image description here](https://i.stack.imgur.com/BIs0R.jpg)](https://i.stack.imgur.com/BIs0R.jpg) that is, ``` 16 3 2 1...
[Question] [ # Intro In most fonts all of the uppercase alphabet characters besides `BDO` have single lines approximately touching some of the four corners of the character's bounding rectangle: `ACEFGHIJKLMNPQRSTUVWXYZ`. For example, the two legs of an `A` "touch" the bottom left and bottom right corners of the ch...
[Question] [ ## Introduction In a private chat, a friend of mine apparently recently stumbled across a security system which has the following two restrictions on its valid pins: * Each digit must be unique (that is "1" may only appear once) * The order of the digits doesn't matter ("1234"="4321") So to illustrate ...
[Question] [ # Challenge [![enter image description here](https://i.stack.imgur.com/dqCkE.jpg)](https://i.stack.imgur.com/dqCkE.jpg) Write a program that takes an array of 4 integers (*which represents a sequence of numbers generated by a certain algorithm*) and returns the next integer that would follow. We will o...
[Question] [ Given a list of strings, output a single string formed by taking a character from each string at each position, sorting them by ASCII ordinal, and appending them in order to the output string. In other words, for `n` input strings, the first `n` characters of the output will be the first characters of ...
[Question] [ One lane is closed, the vehicles have to thread their way in according to the zip-lock system: One car from one lane, the next car from the other lane, always taking turns. **Input**: Two vehicle queues, represented e.g. as strings, in which short cars are represented by individual symbols, lorries by ...
[Question] [ A [Latin square](https://en.wikipedia.org/wiki/Latin_square) of order n is text which is arranged as a square of n lines by n columns, contains n different characters, and each character appears once in each line and column. For example, here is a Latin square of order 9: ``` Code gOlf ode gOlfC de gOl...
[Question] [ Consider a word/string of length \$n\$, only including the letters A-Z, a-z. A word/string is a double prime word if and only if n is prime and the sum of the letters, s, is also prime, using their numeric position in the alphabet (`a=1, B=2, c=3`, etc.). Input can be any combination of upper or lower ...
[Question] [ ## Introduction In geometry, the [Peano curve](https://en.wikipedia.org/wiki/Peano_curve) is the first example of a space-filling curve to be discovered, by Giuseppe Peano in 1890. Peano's curve is a surjective, continuous function from the unit interval onto the unit square, however it is not injectiv...
[Question] [ We all know that any positive integer can be represented as the sum of powers of two. This is how binary representations work. However there's not just one way to do this. The canonical method, used in binary representations represents it as the sum of *unique* powers of two. For example \$5=2^0+2^2\$....
[Question] [ Let \$L\$ be a list of positive integers with no particular ordering, and which can contain duplicates. Write a program or function which outputs a list of positive integers \$M\$ (whose ordering is unimportant) such that merging \$L\$ and \$M\$ results into the smallest list which can entirely split i...
[Question] [ In this question, we will only focus on losing weight by doing exercise, although there are still many ways to lose weight. Different sports burn different amount of calories. For example, playing billiards for an hour can burn 102 calories[[1]](http://calorielab.com/burned/?mo=se&gr=15&ti=sports&q=&wt...
[Question] [ Given a matrix `A`, we can say that it is "sorted" if each row and column of `A` is sorted (ascending left-to-right for rows and top-to-bottom for columns). Thus, this matrix is sorted: ``` [ 1 2 3 4 5 ] [ 2 2 3 4 5 ] [ 3 3 3 4 5 ] [ 4 4 4 4 5 ] [ 5 5 5 5 5 ] ``` However, this matrix is not sorted: ```...
[Question] [ Generate a 7 by 7 grid, filled with random numbers. However, in cells with an odd row and column number (starting at 0), you must use the sum of the surrounding cells. Here's a small example with a 3 by 3 grid (sum-square bolded): ``` 2 2 2 2 **16** 2 2 2 2 ``` And here's an example 7 by 7 grid: ``` ...
[Question] [ A [Fermi-Dirac Prime](https://en.wikipedia.org/wiki/Fermi%E2%80%93Dirac_prime) is a prime power of the form \$p^{2^k}\$, where \$p\$ is prime and \$k \geq 0\$, or in other words, a prime to the power of an integer power of two. They are listed as integer sequence [A050376](https://oeis.org/A050376). Wh...
[Question] [ Inspired by the recent [3Blue1Brown video](https://www.youtube.com/watch?v=bOXCLR3Wric) Consider, for some positive integer \$n\$, the set \$\{1, 2, ..., n\}\$ and its subsets. For example, for \$n = 3\$, we have $$\emptyset, \{1\}, \{2\}, \{3\}, \{1,2\}, \{1,3\}, \{2,3\}, \{1,2,3\}$$ If we take the su...
[Question] [ # Description of the problem Imagine a quarter of an infinite chessboard, as in a square grid, extending up and right, so that you can see the lower left corner. Place a 0 in there. Now for every other cell in position `(x,y)`, you place the smallest non-negative integer that hasn't showed up in the co...
[Question] [ ### Introduction Sometimes, my boxes are too small to fit anything in it. I need you to make a box expander! So, what makes a box a box in this challenge. ``` OOOO O O O O O O OOOO ``` The corners of the box are **always** spaces. The box itself can be made out of the same character. That ch...
[Question] [ Part of [**Advent of Code Golf 2021**](https://codegolf.meta.stackexchange.com/q/24068/78410) event. See the linked meta post for details. Related to [AoC2017 Day 9](https://adventofcode.com/2017/day/9). *[Weekends are Bubbler's days off from posting these lol](https://chat.stackexchange.com/transcript...
[Question] [ Given a natural number `n` write a program or function to get a list of all the possible two factors multiplications that can be used to achieve `n`. To understand better what is pretended you can go to <http://factornumber.com/?page=16777216> to see when `n` is `16777216` we get the following list: ``...
[Question] [ Two random numbers `A` and `B` have been generated to be either 1, 2, or 3 your job is to randomly pick a third number `C` that can also be 1, 2 or 3. But, `C` cannot equal `A` or `B`. * `A` can equal `B`. * If `A = B`, then `C` has only two numbers left it can be. * If `A ≠ B`, `C` has only one number...
[Question] [ You and a friend walk into a bar. The bartender treats you well, so you decide to tip him. So you pull out your trusty pocket computer and write a quick program to calculate a tip for you since it has no built in calculator. But wait! Your operator keys are broken! Your task is to calculate a 20% tip f...
[Question] [ Given two inputs, a string \$s\$ and a decimal number \$n\$, output the string multiplied by that number. The catch is that the number can be a float or an integer. You should output the string \$\lfloor n \rfloor\$ times and then the first \$\lfloor (n - \lfloor n \rfloor) \cdot |\,s\,|)\rfloor\$ char...
[Question] [ The goal of this challenge is to make a program that outputs the nth letter of its source code where n is given as input to the program. Like most quine challenges, you are not allowed to read your source code as a file or use any builtin quine functions. ## Input An integer 0 <= n < len(program). ## O...
[Question] [ What general tips do you have for golfing in MATLAB? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to MATLAB (e.g. "remove comments" is not an answer). Please post one tip per answer. [Answer] Something that one must know before star...
[Question] [ **Story** (skip, if you prefer the naked task): You need five skills for an imaginary sport: Speed, strength, endurance, accuracy and tactics. If you achieve a score in each of these disciplines, you can work out how well you have mastered the sport as a whole. But, as your coach always says: concentra...
[Question] [ Write a program that will output its own source code when run, and nothing else. Seems easy, right? The catch is that when the source code is reversed, your program must output "Hello, World!" exactly, without the quotes. This is code-golf, so lowest byte count wins. **Edit**: Your quine must be a prop...
[Question] [ ## Introduction Remember the roaring 80's? I mean, you know, like 30 years ago? No cell phones, no internet, no ATM's, fluorescent clothing (what was that?!) and **scrolling marqee's**! No, no, no! Not the online ones, but real ones, With LED lights. [![Scrolling marquee](https://i.stack.imgur.com/yISw...
[Question] [ This is a rewrite of the (currently closed) ["Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”"](https://codegolf.stackexchange.com/questions/44278/debunking-stroustrups-debunking-of-the-myth-c-is-for-large-complicated-pro) challenge. ## Challenge Write the **...
[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. --- Santa and the Elves are secretly preparing for a new tourist train service, called "No...
[Question] [ Simpler version of [this](https://codegolf.stackexchange.com/questions/236812/triangle-of-triangles) ## Task You must create a program that outputs a triangle of a given size N. * A triangle is made of 3 identical triangles * A triangle of size N should be made of N lines * A triangle's line starts fro...
[Question] [ [A001057](https://oeis.org/A001057) is one way to represent an integer as a natural number. It lists them according to the following pattern: ``` 0, 1, -1, 2, -2, 3, -3, 4, -4, ... ``` In this challenge, you'll take two distinct integers as input and return which is at a higher index in this enumeratio...
[Question] [ > > This challenge has officially ended. Further submissions will not be competitive (but are still welcome!). View the scores [here](https://github.com/Radvylf/koths/blob/master/Simple%20Race%20KoTH/results.md) > > > In this challenge, submissions ("bots") should be Javascript functions which try ...
[Question] [ # Supreme Sum String Given an input string, return the word with the highest sum of each of its unicode characters. ## Rules * The input should be seperated by whitespace * The value of each word is based on the sum of each character in the word's UTF-16 code * The output should be the first word with...
[Question] [ # Challenge : Given a word, check whether or not it is an isogram. --- # What : An isogram is a word consisting only of letters with no duplicates (case insensitive). The empty string is an isogram. --- # Examples : ``` "Dermatoglyphics" ---> true "ab" ---> true "aba" ...
[Question] [ You must write a program that takes an encrypted string and decrypt it according to specific rules and then print it out. Decryption will occur by performing two operations. **Sample Input Argument 1** (the encrypted string) ``` HGJILKBADCFE ``` **Operation 1:** Swap the first half of the string with t...
[Question] [ The oldest [Polish salt mine, located in Bochnia](https://en.wikipedia.org/wiki/Bochnia_Salt_Mine)\*, was started in year 1248, which we can consider a *magical number*. We can see that it's equal to 4 digits from the sequence of exponentiations: ![2^0, 2^1, 2^2, 2^3](https://chart.googleapis.com/chart...
[Question] [ Ok I've been on a bit of a triangle kick recently so here's another one. Clark's Triangle is a triangle where the leftmost entry of each row is 1 and the rightmost entries are made up of multiples of 6 which increase as the row number increases. Here's a visualization ``` 1 6 1 . 12 1 . . 1...
[Question] [ Given a sequence of integers with length \$L\$ and an integer \$1 \le N \le L\$, an "\$N\$-rich" permutation is one whose the longest **strictly** increasing **contiguous** subsequence has length exactly \$N\$. For example, let our sequence be `[0, 1, 2, 3]`. There is exactly one \$1\$-rich permutation...