instruction
stringlengths
34
53.1k
Write two code fragments, which we will call s_zero and s_one. Program (l, n) consists of l copies of s_zero and s_one corresponding with the digits of n in binary, padded with s_zero on the left. For example, if s_zero = foo and s_one = bar then Program (4, 0) = foofoofoofoo Program (4, 1) = foofoofoobar Program (4, 2...
I am learning Ruby and wrote my first nontrivial code to solve this problem. The challenge is to generate the first n elements of the Stöhr sequence, S, which is defined as follows: S[0] = 1 S[n] is the smallest number that cannot be expressed as the sum of two distinct previous elements in the sequence. Thus the seq...
This is an answer-dependent challenge! The order of answers matters, and your exact task depends on the last answer that was posted. You might want to sort the answers by oldest. Let's piece together some code! Here are 1920 random (printable ASCII) characters. Think of them as a big heap of unsorted jigsaw puzzle pi...
Final results are here ! Introduction The game takes is strongly inspired by Manu's Game of Town. It takes place in a world of swords and magic. The king who ruled the whole continent just died, and the lords of the many city-states are now fighting over territory. You are one of these lords and your goal is to conquer...
Given an integer N, count how many ways it can be expressed as a product of M integers > 1. Input is simply N and M, and output is the total count of distinct integer groups. Meaning you can use an integer more than once, but each group must be distinct (3 x 2 x 2 would not count if 2 x 2 x 3 is present). Constraints 1...
Challenge Write a solver for the Chess Light puzzle game, in the smallest amount of code. The input will be a representation of a chessboard, how in yours is up to you. My examples below is textual, in which some squares may already be occupied by black peices. Some of the unoccupied squares are designated with a #, al...
You just have to ouput exactly all the numbers from 1 to 10 separated by spaces. Your programme should work all the times even if a random character is deleted before compiling/interpreting. This is code-golf so shortest code in bytes win!
Can you find initial conditions for either Rule 110 or Conway's Game of Life to emulate the other? That is, produce output (in any form, not necessarily the familiar pixel grid) which corresponds directly to the other. Rule 110 takes an infinite one-dimensional binary array as input, and outputs an infinite one-dimensi...
This is my first code golf challenge, as such I am not entirely certain if it is suitable as a Code Golf challenge, but it's all a learning experience. The challenge is that in as few characters as possible, using whichever language you prefer, develop a code to complete the following: Take a value from stdin Return a...
Objective/Restrictions: May only be answered with programming language that has function syntax (or procedure, method, lambda, macro, statement grouping and labelling) . Create a function with at least 2 argument/parameter, that generates an array containing 7 random strings, each string contains 3 characters, string...
This challenge will behave more or less like a traditional code-golf. The only difference is that instead of scoring answers by their number of characters or bytes, users will assign weights to different characters in the comments and the program with the lowest cumulative weight will win. Challenge Your task is to wri...
Rules/Objectives: The program must be executed using ./program-name without shell parameter/arguments. the program-name may not contain any of characters in /etc/passwd, that is acdepstw You may not open any other file, including own's source code, only /etc/passwd that should be read. The program must print the conte...
Input An alphanumeric string s. Output The shortest string that occurs exactly once as a (contiguous) substring in s. Overlapping occurrences are counted as distinct. If there are several candidates of the same length, you must output all of them in the order of occurrence. In this challenge, the empty string occurs n ...
This challenge is not about the game Snake. Imagine a 2d snake formed by drawing a horizontal line of length n. At integer points along its body, this snake can rotate its body by 90 degree. If we define the front of the snake to be on the far left to start with, the rotation will move the back part of the snake and t...
Suppose you are given a set of non-intersecting intervals of integers [a1,b1],[a2,b2],[a3,b3],...,[aN,bN]. (Where [a,b] is the set of integers greater than or equal to a and less than or equal to b.) The interval at index X covers bX - aX + 1 values. We'll call this number cX. Given that each interval can either be... ...
This is a code golf challenge to see the shortest implementation of an automated guesser in the pen and paper game bulls and cows. The game works as follows: A (usually 4 digit) secret code with only distinct integers 0-9 is picked by one player. A second player guesses codes that each receive a rank. This rank contai...
This is based on xkcd #153. Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain characters drawn from lrfu (or the equivalent ASCII bytes). It should be interpreted as a series of instructions to be perfor...
Challenge The challenge is to create a program which takes a date, a latitude, and a longitude, and prints the time of the sunrise on that date for the given location. The program must work for any valid date between January 1, 2000, and December 31, 2999. Internal and external sunrise functions are disallowed. Date l...
I'm currently trying to solve a tricky/silly challenge and i've come to a dead end. The challenge is basically to form a one-liner /bin/sh compatible command line which essentially outputs "Hello World" without directly typing White space or Tab characters in the command itself. for example something like - echo Hello ...
Background This is a continuation of my earlier challenge, where the task was to compute the shape of a sculpture obtained by dropping magnets into a huge pile. Good news: the eccentric artist liked your work, and has another project for you. He still works with magnetic sculptures, but has decided to expand his art st...
Number fight game Setup Each ai is given a random number from 1 to 100. The starting number is the average of these two numbers. Gameplay Each ai knowing its own target, the opposite target and the current number, chooses which function to apply to the current number. WIN conditions The first ai that reaches its ...
The Game Recently, much of my time has been taken up by an addicting game on my phone, called Logic Dots, which inspired me to write this challenge. It's easier to explain the rules if I show you the game display, so here is a screenshot of an unsolved, and solved puzzle: Now here, there are three main things to noti...
Take an array of integers containing negative numbers, positive numbers and zeros. Group it with one iteration and in place such that all of the negative numbers come first, followed by all of the zeros, followed by all of the positive numbers. Example: Input: 5, 3, 0, -6, 2, 0, 5 Output: -6, 0, 0, 3, 2, 5, 5 Note th...
We've all seen the famous painting of Marilyn Monroe created by Andy Warhol. Let's try to replicate that effect with the usual suspects. Your task is to write a program/programs that do as many as possible of the following tasks: With one image as the input, generate four color palettes from that image and print a 4x...
An incremental word chain is a sequence of words of a vocabulary such that each word is the result of either prepending or appending a single character to the previous word, ignoring capitalization. An example of such a chain can be found below. I → is → his → hiss Your task is to write a program that for a given voc...
You decided to organize a rock-paper-scissors championship to find out who is the best. You don't want to let luck to decide the winner so everyone has to give you his or her tactic in writing before the competition. You also like simple things so a move of a competitor (showing rock, paper or scissors) has to be based...
Inspired by this recent article telling of a French programmer who wrote a 487 byte 2-player (human vs. human) chess program in Assembly, I wondered how small chess programs could be in other languages. Details The program must only accept legal chess moves. Declaration of check/checkmate is not necessary (just desira...
Your friend isn't too good with computers so as a practical joke someone scrambled the letters (a-z) on his keyboard. When he sit down and tried to type his name looking at the keyboard he realized that the letters are scrambled and asked your help. You are smart so you know that if he types his name and then repeatedl...
This is based on this challenge and Geobits's/CarpetPython's idea to improve it: Keep your distance! For this challenge, the distance between two numbers is measured on a loop, so, for example, the distance between 0 and 999 is 1. This should prevent strategies like always picking the lowest or highest number from winn...
I'm looking for some solution in returning values in main function, I need to shorten my program more, return 0 takes too much characters of my code, I need to return 0, or my code fails. I know that in C there can be no return statement, and then program will use result of last operation - but on which operations I ca...
This is a new kind of challenge inspired by the Recover the mutated source code problem. You should write two programs or functions both in the same language. The first one should solve Task #1 and the second one should solve Task #2. Your score will be the sum of the longer program and the Levenshtein distance betwee...
In statistics, sometimes it's useful to know whether two data samples come from the same underlying distribution. One way to do this is to use the two-sample Kolmogorov-Smirnov test. Your task will be to write a program that reads in two unsorted nonnegative integer arrays and calculates the main statistic used in the ...
The task is to count the number of distinct substrings of length k, for k = 1,2,3,4,..... Output You should output one line per k you manage to complete with one number per output line. Your output should be in order of increasing k until you run out of time. Score Your score is the highest k you can get to on my compu...
Input A nonnegative integer n, and a nonempty string s containing only alphanumeric characters and underscores _. The first character of s is not _. The underscores of s are interpreted as blank spaces that can be filled with other characters. We define an infinite sequence of "infinite strings" as follows. The string ...
Your task is to implement an Enigma encryption machine. Your program will accept the machine initialization information followed by a string of text to be encrypted. Initialization vector will be Rotors used (Left to right). Will be three characters. Rotors 1-5 are valid. Initial rotor settings (A-Z) Left to right. R...
Your kindly neighbour, Doctor Tree, just gave you three magical creatures called Codémon. There's a battle tournament in the nearby town of Colorville. Are you the very best, like no one ever was? Overview This is a battle tournament. Each player controls a team of three monsters, and the objective is to knock out (k...
Your should write a program or function that takes a 4-character string as input and outputs a value indicating if the string is an English word or not. You are allowed to make mistakes in 15% of the provided testcases. Input details: Input is a 4-character string containing only the lowercase English letters (a-z). Ou...
About the Series I will be running a little series of code-golf challenges revolving around the theme of randomness. This will basically be a 9-Hole Golf Course, but spread out over several questions. You may participate in any challenge individually as if it was a normal question. However, I will maintain a leaderboa...
Your program will control a mining robot searching underground for valuable minerals. Your robot will tell the controller where you want to move and dig, and the controller will provide feedback on your robot status. Initially your robot will be given an image map of the mine with some mining shafts already present, an...
Landslides In this challenge, your job is to predict the extent of damage caused by a massive landslide. We use the following simplified two-dimensional model for it, parameterized by an initial height h >= 0 and a critical coefficient c > 0. You start with a cliff of height h, and it is assumed that the terrain is com...
Stack Exchange currently has 134 question and answer sites. This includes all beta sites (such as PPCG) but not Area 51 proposals nor any meta sites, except for the "mother meta". To answer this question, choose one of those sites and write a program where every line of code is an anagram of the title of a different qu...
Consider a function plot like this: ########### ################# #################### ...
Write a full program to calculate the inverse of a 4-by-4 matrix. Rules The sixteen values of the initial matrix must be hard-coded to variables, as follows: _ _ |a b c d| |e f g h| |i j k l| |m n o p| - - Then print the values of the inverse matrix, row by row, with each number separated by some delimiter...
Introduction Scientists have recently found a new type of bacteria that replicates in odd ways. To reproduce, two bacteria each split into 3 (for a total of 6) and pairs combine (resulting in 3 bacteria, two parents, one child). However, the bacteria can only split if it has a partner. For example, 2 bacteria split and...
Challenge Write the shortest snippet of code possible such that, when N copies of it are concatenated together, the number of characters output is N2. N will be a positive integer. For example if the snippet was soln();, then running soln(); would print exactly 1 character, and running soln();soln(); would print exactl...
Consider the set of 16-character strings containing only the 95 printable ASCII characters. There are 9516 ≈ 4.4×1031 such strings. Imagine these strings are put into a list and sorted lexicographically (which is the way most languages will sort a list of strings). What is the largest contiguous slice of this list you ...
When playing the piano, I realized that to play a chord right, I usually need to remember just which tones of the chord are played on white and which on black keys. The rest is usually handled by the "autopilot". Let's write a program that given a 7th chord, it outputs which of its tones are to be played on black (char...
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 blocks) the remainder ca...
Let f be the function that maps a bitfield ({0 1}) of size n+1 to bitfield of size n by applying XOR to the ith and i+1th bit and writing the result in the new bitfield. Example: f("0101") = "111" Informal calculation: 0 XOR 1 = 1 1 XOR 0 = 1 0 XOR 1 = 1 Let f_inverse be the inverse function of f. Since the inverse ...
Background Two strings s and t are called k-Abelian equivalent (shortened to k-equivalent in the following) for a positive integer k if the following conditions hold: The length-k-1 prefixes of s and t are equal. The length-k-1 suffixes of s and t are equal. The strings s and t have the same multisets of length-k cont...
About the Series First off, you may treat this like any other code golf challenge, and answer it without worrying about the series at all. However, there is a leaderboard across all challenges. You can find the leaderboard along with some more information about the series in the first post. Although I have a bunch of i...
The video game Minecraft is all about placing and removing different types of blocks in the 3D integer lattice that makes up the virtual world. Each lattice point can contain exactly one block or be empty (an "air" block officially). In this challenge, we will only be concerned with one vertical 2D plane of the 3D worl...
Now with BONUS for run-time placement. Write a program to fill a text box with the identifiers used in your program while keeping your program small. With all the identifiers you have used (excluding those you created) in your program, fill a 12x6 box with as many as you can. You get extra points for identifiers that ...
In this challenge, your input is a string of lower-case letters like this: insertspacesbetweenwords and a dictionary like the that from my other challenge. You may assume that the dictionary file contains only lower-case letters and line-feed characters. Furthermore, the last character in the dictionary file is a line...
Privileged Strings The set of privileged strings is defined recursively as follows. All strings of length 0 or 1 are privileged. A string s of length at least 2 is privileged, if there exists a shorter privileged string t that occurs in s exactly twice, once as a prefix and once as a suffix. Overlapping occurrences ar...
Background Most (halfway decent) text editors allow you to navigate text using the arrow keys. Up and down allow you to navigate lines, while left and right move across a line but also wrap around. Furthermore, if the line is shorter than your cursor's X position, the cursor appears at the end of the line but returns...
Challenge Write the shortest program that converts a human readable time interval to date components of the form: {±YEARS|±MONTHS|±DAYS|±HOURS|±MINUTES|±SECONDS} Sample cases Each test case is two lines, input followed by output: 1 year 2 months 3 seconds {1|2|0|0|0|3} -2 day 5 year 8months {5|8|-2|0|0|0} 3day 9 ...
A curious kid uses a program which can factorize a number or an expression into the following form: p1^e1 * p2^e2 * ... * pn^en . Exponents equal to 1 are omitted e.g. 360 = 2^3 * 3^2 * 5 The kid types this output into the program as new input but they don't understand the ^ sign so sometimes they skip one or more of t...
Here is a simple, bite-sized (byte-sized?) code golf: given a non-empty list of positive integers less than 10, print a block-diagonal matrix, where the list specifies the size of the blocks, in order. The blocks must consist of positive integers less than 10. So if you're given as input [5 1 1 2 3 1] Your output coul...
I have one hundred vaults, each one within another. Each vault has a password, consisting of a single number. 95 43 81 89 56 89 57 67 7 45 34 34 78 88 14 40 81 23 26 78 46 8 96 11 28 3 74 6 23 89 54 37 6 99 45 1 45 87 80 12 92 20 49 72 9 92 15 76 13 3 5 32 9...
Background Story Bob was handed the following assignment for his programming class. Please note: this is not the actual challenge. Homework assignment 11: Twin primes Input: an integer n ≥ 8, taken from STDIN. Output: a message to STDOUT, depending on n: If n is not a prime number, output Not prime. If n is a prime n...
Background The game of Morra is a simple game. In the "original" version, several players simultaneously throw out a number 0-5 with their hands while guessing the total sum of everyone's hands. The version I'll use here has been modified to increase the potential for non-trivial strategy, and it is described below: ...
Intro - Nearest neighbour comparison between two arrays is something that can be done very efficiently when only 1 variable per array is involved, because it can be done by sorting and then performing a rolling comparison. However, for a 2 variable comparison this sort operation cannot be done anymore and another smart...
Quines are fun. Polyglots are fun, too. Polyglot Quines exist, but we can raise the bar even higher. Write a file that contains a valid program for languages α, β, and γ. When the file is executed (possibly after compiling it) as a language α or β program, the program's output shall be of the same form as a valid submi...
In the C standard library, header names end with a .h suffix: stdio.h In C++, those header names are available in an alternative form, with a c prefix instead: cstdio Write a function that converts the first form into the second. You can do the conversion in-place, or leave the original string intact and return a new...
Happy Valentine's Day! To celebrate this day of love and happiness (or sadness and loneliness for those of us who are single...), let's write some code to create some hearts! Specifically, if you take this challenge upon you, you are to write code to output a heart/hearts as an image file, with the ability to easily ch...
The Vigenère cipher is a substitution cipher where the encryption of each letter of the plaintext depends on a different character in a keyword. This stops you using simple methods of frequency analysis to guess the correct substitution. However, the keyword is repeated if it is shorter than the plaintext. This is a...
Input Your input is a single string, separated by newlines into 2n+1 lines of length 2n+1, for some integer n ≥ 0. The integer n is not part of the input; you'll have to compute it from the string. The lines are composed of the "direction characters" >^<v. If newlines pose a problem, you can replace them by vertical pi...
I see GolfScript, Pyth, CJam and similar languages can make compex-ish algorithms in few bytes. This terseness makes think about genetic programming applications (using said languaes as the thing being mutated). I assume that to make a good GP language, it should have following characteristics: Programs are typically ...
The Hamming(7,4) code goes back to 1950. Back then Richard Hamming worked as a mathematician at Bell Labs. Every Friday Hamming set the calculating machines to perform a series of calculation, and collected the results on the following Monday. Using parity checks, these machines were able to detect errors during the co...
Scenario: Imagine a situation where you wish to share a unique alphanumeric code. Perhaps it is a one-time-use coupon code you hand write on business cards, or some other scenario where it is desirable to have a code where mis-keying the entry is unlikely to produce valid result and the another valid code is not readil...
The challenge This challenge is going to be a classic king of the hill game of RPS. You must write a program that takes two command line arguments, a string of all the moves that you have made, and a string of all the moves that your opponent has made. The program will then return either 'r', 'p' or 's' for rock, paper...
Given: A natural number S. A list of N rational weights W that sum to 1. Return a list L of N non-negative integers, such that: (1) sum(L) = S (2) sum((S⋅W_i - L_i)^2) is minimal In other words, approximate S⋅W_is with integers as closely as possible. Examples: 1 [0.4 0.3 0.3] = [1 0 0] 3 [0 1 0] = [0 3 0] 4 [0.3 0....
This is the same question as Solve the CodeSprint4 Leibniz code golf challenge in Python in 66 characters. The variation is that I'm a C programmer. My code for the above question is: #include <math.h> main(){ int i,t,p; scanf("%d",&t); while(t--) { double s=1; scanf("%d",&p); for(i=1;i<p;++i) s+=pow(-1...
The video game Minecraft is all about placing and removing different types of blocks in the 3D integer lattice that makes up the virtual world. Each lattice point can contain exactly one block or be empty (an "air" block officially). In this challenge, we will only be concerned with one horizontal 2D plane of the 3D wo...
Boys and girls are excited to see Fifty Shades of Grey on the silver screen, we just want to code without being bothered, so here's a challenge to pick our brain. You have to: Print on the screen fifty squares filled each with a different shade of grey If your language of choice lacks image processing capabilities, yo...
Given a URI like: postgres://username:password@hostname:PORT/dbname Extract it all into an array data-structure, like so: ['postgres', 'username', 'password', 'hostname', 'PORT', 'dbname'] More info: http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax Rules No use of external libraries or web-services Scoring Y...
Story: Lucy asked George what his Lucky Number was. After some contemplation, George replied that he had several Lucky Numbers. After some brief confusion, Lucy asked George what his first n Lucky Numbers are. George then asked you, his buddy, to write him a program to do the work for him. The Challenge: You will write...
The Devil's Staircase is a fractal-like function related to the Cantor set. Your task is to replicate this funky function — in ASCII art! Input A single integer n >= 0, indicating the size of the output. Input may be given via STDIN, function argument or command-line argument. Output The ASCII-art rendition of the Dev...
Definitions Let m and n be positive integers. We say that m is a divisor twist of n if there exists integers 1 < a ≤ b such that n = a*b and m = (a - 1)*(b + 1) + 1. If m can be obtained from n by applying zero or more divisor twists to it, then m is a descendant of n. Note that every number is its own descendant. For ...
Heatmaps Consider a rectangular room, on whose ceiling we have a thermal camera pointing downward. In the room, there are some number of heat sources of intensity 1-9, the background temperature being 0. The heat dissipates from each source, dropping by one unit per (non-diagonal) step. For example, the 20x10 room .......
For a given DAG (directed acyclic graph), each of its topological sorts is a permutation of all vertices, where for every edges (u,v) in the DAG, u appears before v in the permutation. Your task is to calculate the total number of topological sorts of a given DAG. Rules You can use any format to represent the graph, l...
My daughter had the following assignment for her math homework. Imagine six friends living on a line, named E, F, G, H, J and K. Their positions on the line are as indicated (not to scale) below: Thus, F lives five units from E, and two units from G, and so forth. Your assignment: craft a program that identifies a pat...
Years ago I read the "Best of Ruby Quiz" book by James Edward Gray II (also available online by now). For problem 2 in the book (which is problem 14 on his original RubyQuiz site), he mentions a golfed solution in under 300 bytes, even though he is not a big fan of golfing. So I did wonder if I could beat that and mayb...
NOTE: This challenge is currently dead, as I'm unable to install the languages needed to run a match. If someone else has the time and interest to do it, I'm not opposed. See the bottom of the post for a leaderboard. This is a semi-cooperative king-of-the-hill challenge, where the bots construct paths through a two-dim...
Counting the amount of triangles in a picture is a task commonly used in brain tests. You are given a picture that contains shapes consisting of triangles. You then must find all possible triangles in the picture. Task You are given a list of lines in a format of your choice. You must then output a list of triangles fo...
Your task, if you choose to accept it, is to write a program/function that accepts an integer \$N\$ as input. The program/function should output/return a list of the first \$N\$ prime numbers. But here's the catch: you are not allowed to use prime characters in your code. A prime character is a character whose Unicode ...
This challenge is brought to you by real (and tragic) inspiration. Recently, the number row on my keyboard has been a bit sporadic. The keys 1-9 work sometimes--but other times they have no result. As an avid programmer, this is horrible! (See that exclamation point? That's how you know they're working right now.) Not ...
The English language and most programming languages are written and read from left-to-right, top-to-bottom, but that needn't be the case. In fact for the block of text ABC DEF I can think of eight related ways it might be read: Left-to-right, top-to-bottom (LTR-TTB): ABCDEF Top-to-bottom, left-to-right (TTB-LTR): ADB...
Sometimes I need to write more documentation than just comments in code. And sometimes, those explanations need screenshots. Sometimes the conditions to get such a screenshot are so weird that I ask a developer to take a screenshot for me. Sometimes the screenshot does not fit my specifications and I have to resize it ...
Let's assign the numbers 0 through 94 to the 95 printable ASCII characters: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Space is 0, ! is 1, and so on until ~ is 94. We'll also assign 95 to tab (\t) and 96 to newline (\n). Now consider the infinite string whose Nth cha...
Noel Constant did it without genius and without spies. His system was so idiotically simple that some people can't understand it, no matter how often is is explained. The people who can't understand it are people who have to believe, for their own peace of mind, that tremendous wealth can be produced only by thr...
Background A Davenport-Schinzel sequence has two positive integer parameters d and n. We will denote the set of all Davenport-Schinzel sequences for given parameters by DS(d,n). Consider all sequences of the natural numbers 1 to n, inclusive, which satisfy: No two consecutive numbers in the sequence are identical. The...
Rosetta Stone Code Challenges are challenges where you must complete the task in as many languages as possible. The Challenge You will be given two numbers, n and s, in a list as input. The n will be a number you have to count up to. n will be any number from 2 to 10000. s will be the number you skip by when counting u...
There's a board with n squares in a horizontal row. You start in the leftmost square, and roll a 3-faced dice. 3 possible outcomes for a single roll of the die: Left: you move 1 step to the left, if possible. None: you stay where you are Right: you move 1 step to the right, if possible. You want to roll the dice exac...
Today I realised that I often like to define sections in my code like so: #################### # Helper Functions # #################### But that it's tedious to do. Assuming I have a line such as this: # Helper Functions # What is the shortest set of vim keystrokes to wrap it in a #? Shift does not count as a keystr...
The major system is a mnemonic device for converting numbers into words so they can be memorized more easily. It is based on how words sound phonetically, but to keep things simple for the challenge we'll only be concerned with how words are spelled. This means there will be some incorrect conversions, but that's alrig...
About the Series First off, you may treat this like any other code golf challenge, and answer it without worrying about the series at all. However, there is a leaderboard across all challenges. You can find the leaderboard along with some more information about the series in the first post. Although I have a bunch of i...
Given a list of integers produce a Forward Difference at a specified order/depth. For the list of integers: (10, 18, -12, 4, 8, -3, -5, 67, 9, 14) The Forward Differences at the various orders/depths are: 0 10, 18, -12, 4, 8, -3, -5, 67, 9, 14 1 8, -30, 16, 4, -11, -2, 72, -58, 5 2 ...
Note: This isn't as much a golfing challenge; it is more so asking for golfing suggestions. Recently I had a Python assignment for my web development class, in order to check whether we could code. Since I already feel comfortable in Python, I decided to try and golf it, and I was wondering if people could point out th...