I use the following very often: I would like to make this as short as possible, perhaps even 1 character? What's the shortest way to create a new p ...
I use the following very often: I would like to make this as short as possible, perhaps even 1 character? What's the shortest way to create a new p ...
(Coffee Script, but you get the idea). I'm looking for a trick to take a boolean and convert it to either 1 (true) or -1 (false). that way I can do ...
In golfing, one tries to complete a puzzle in as few characters as possible, generally using the base language only. One trick for golfing in R is to ...
I am kind of a newbie to Ruby, I am working out some katas and I stuck on this silly problem. I need to copy the content of 1 file to a new file in 1 ...
The following 32bit x86 Linux program prints a string of arbitrary length (as long as a program can be, anyway) and does exit(0) afterwards: If one ...
I was trying to solve this problem here :- https://www.spoj.pl/problems/PHIVAL/ The questions asks you to output as many decimal digits of the golden ...
I have a code like that: This code is related to my other question's answer: DNA to RNA and Getting Proteins with Perl The output of the program i ...
Remember that away message on aim that said how: Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers ...
Finite state machine A deterministic finite state machine is a simple computation model, widely used as an introduction to automata theory in basic C ...
Challenge Compactify a long list of numbers by replacing consecutive runs with ranges. Example Input 1, 2, 3, 4, 7, 8, 10, 12, 13, 14, 15 The inpu ...
Challenge Here is the task, inspired by the well-known British TV game show Countdown. The challenge should be pretty clear even without any knowledg ...
Here's a pretty simple idea, in this pastebin I've posted some pair of numbers. These represent Nodes of a directed graph. The input to stdin will be ...
I had to make a really small and simple script that would fill a table with string values according to these criteria: 2 characters long 1st cha ...
I cannot think of any solution that does not involve loop-bruteforce :-( I expect a function/program, that accepts a decimal number and returns a s ...
Introduction A valid Sudoku grid is filled with numbers 1 to 9, with no number occurring more than once in each sub-block of 9, row or column. Read t ...
Rules The Towers of Hanoi is a puzzle, and if you are not very familiar with it, here is how it works: The play field consists of 3 rods, and x numb ...
Given the output of git ... --stat: I wanted to produce the sum of the numeric columns but preserve the formatting of the line. In the interest of ...
The Challenge The shortest program by character count that outputs the n-bit Gray Code. n will be an arbitrary number smaller than 1000100000 (due to ...
I wrote some mail merge code the other day and although it works I'm a turned off by the code. I'd like to see what it would look like in other langua ...
Unfortunately, this may not be a valid Code-Golf question as it is likely Javascript only; however, since this is likely to be the only useful-in-th ...