7
votes
8answers
240 views

Symbolic Differentiation of Polynomials

Symbolic Differentiation 1: Gone Coefishin' Task Write a program that takes in a polynomial in x from stdin (1 < deg(p) < 128) and differentiates it. The input polynomial will be a string of ...
5
votes
4answers
127 views

Heaviest increasing subsequence

A subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. A strictly increasing subsequence is a subsequence ...
-2
votes
0answers
29 views

Bijective Card-ary [duplicate]

Context A single suite from a deck of cards has its cards arranged in this order: A, 2, 3, 4, 5, 6, 7, 8, 9, T, J, Q, K. (We use the symbol T for 10). A bijective base b numeration, where b is a ...
16
votes
3answers
492 views

Take It or Leave It: A Game Show for Computers

Context: A reclusive billionaire has created a game show to attract the world's best and brightest programmers. On Mondays at the stroke of midnight, he chooses one person from a pool of ...
13
votes
2answers
214 views

A fiercer four-square cipher

Background One-hundred and thirteen years ago, amateur cryptographer Félix Delastelle published his work on the four-square cipher, a digraphic substitution cipher that accepts two permutations of a ...
1
vote
2answers
168 views

Avoid the Bullet Bills

In 2D Mario, Bullet Bill cannons are two units tall. The Bullet Bill is fired out of the upper unit and travels in a straight line (parallel to the x axis). Mario is two units tall when standing up ...
14
votes
10answers
1k views

64 bit ASCII weaving

Input Two integers: A non-negative integer W in the range 0 to 2^64-1, specifying the weave. A positive integer S in the range 1 to 255, specifying the side length. These can be taken in ...
7
votes
3answers
374 views

Code Golf : Parsing google results

When you search something on google, within the results page, the user can see green links, for the first page of results. In the shortest form possible, in bytes, using any language, display those ...
8
votes
2answers
164 views

All your bijective base are belong to us

Background A bijective base b numeration, where b is a positive integer, is a bijective positional notation that makes use of b symbols with associated values of 1 to b. Unlike its non-bijective ...
3
votes
1answer
357 views

MIRROR | ЯOЯЯIM

Challenge Given the equation of a line and the coordinates of the vertices of a shape, output the coordinates of the shape when reflected across the given line. Further Information The line's ...
4
votes
0answers
134 views

C# program containing `? null :` that is still valid without `null`

I found an old post on Jon Skeet's blog that pointed out a puzzle from a tweet by Vladimir Reshetnikov: C# quiz: write a valid C# program containing a sequence of three tokens ? null : that ...
10
votes
7answers
1k views

Non-idempotent Python [on hold]

Write a few lines of Python code, X, that does not reference any global variables, such that def method(): X print(a) method() prints 1 but def method(): X X print(a) ...
8
votes
13answers
2k views

Is 7 l8r than 9? (Is seven later than nine?)

This is a fairly simple code golf challenge. Your program, given an ASCII string, is to parse that string into two strings, which it will evaluate. If the second string is "later" than the first one, ...
18
votes
5answers
1k views

Bowl Filled with Water

You should write a program or function which receives the volume of a bowl and the volume of the water in it as input and outputs or returns an ASCII representation of a bowl with water in it with the ...
9
votes
1answer
268 views

Pair Capacitors

Capacitors are notorious for being manufactured with high tolerances. This is acceptable in many cases, but some times a capacity with tight tolerances is required. A common strategy to get a capacity ...
19
votes
1answer
254 views

telgif: inverse figlet

figlet is utility that converts plain text to an ascii-art representation for use in banners and the like. For example: $ figlet "CODE GOLF" ____ ___ ____ _____ ____ ___ _ _____ / ...
1
vote
2answers
284 views

Quit Whining; Start Quining

Quit Whining; Start Quining Goal: Write a function or program that, given an integer n, will output a program in the same language that is a quine with a period of n. Description of Output Program: ...
0
votes
0answers
46 views

Chess floor problem from topcoder [on hold]

I came across this chess floor redesign with smallest number of tile changes problem. Here is the link: http://community.topcoder.com/stat?c=problem_statement&pm=13917&rd=16512 I understood ...
7
votes
4answers
389 views

Average Out Two Lists

Average out two lists Challenge Given two lists of positive integers, determine whether it is possible to rearrange the elements into two new lists such that the new lists have the same arithmetic ...
4
votes
1answer
229 views

Cross platform… You wish

Write a program that will produce differing behaviors on as many different platforms as you can. Each differing platform awards one point (including an initial platform, meaning you can't score less ...
15
votes
5answers
1k views

Find the nearest clock hands

Challenge Given a number of seconds past midnight, output the smallest angle between any two hands on a clock face, using as few bytes as possible. You may assume that the number of seconds is ...
8
votes
1answer
185 views

Marching Squares Lookup

Marching Squares is an algorithm from computer graphics, which is used to recover 2D isocontours from a grid of samples (see also, its big brother Marching Cubes for 3D settings). The idea is to ...
10
votes
4answers
443 views

Display words using 7-segment display

My first ever Programming Puzzles & Code Golf is the Seven-Slash Display. Here is my first Challenge, also based on 7-segment display. I often think about, besides numbers, what kind of letters ...
10
votes
1answer
186 views

Write a D*mn Unambiguous Censor

Censors are a common tool used on the interwebs. But they often censor too much of the word, and thus make the cursing ambiguous to the reader. And sometimes they don't censor enough, so the words ...
0
votes
0answers
60 views

Create a working Stack [duplicate]

Your mission, if you choose to accept it, is to create a stack that can do basic math operations. Explanation: Your stack must be able to do basic arithmetic (+-*/) and must support normal base 10 ...
-2
votes
0answers
80 views

“Magic erase” part of an image [on hold]

Goal Create a tool that loads an image and four coordinates on that image. The tool should try to erase the given part (rectangle constructed by the four coordinates) and save it to the same file. ...
47
votes
14answers
6k views

A code golf challenge, m'kay

Mr. Mackey is a South Park character well-known for adding "m'kay" in everything he says. Write a program or function that transforms a string of text into something Mr. Mackey would say. M'kay ...
-5
votes
0answers
63 views

simple java proxy [on hold]

I want to create the simplest java proxy possible. Must handle http / https (others like ftp a plus). I basically just want to log all the urls I send from my browser (firefox) and have the proxy run ...
-5
votes
0answers
211 views

The Time Traveller's Watch [on hold]

Disclaimer: The physics in this challenge are very simplified (i.e. ignoring gravitational field strength) to make the challenge easier to answer Challenge Using the phone GPS, produce a Pebble ...
33
votes
15answers
4k views

Minecraft Mirrored

This is Calvin. Just trying to get 20 rep so this user can chat in the PPCG Minecraft Server chatroom. Write a program or function that takes in a positive integer. If the integer is even (2, 4, 6, ...
31
votes
12answers
4k views

The Will Rogers Phenomenon

The so-called Will Rogers phenomenon describes a way to tweak statistics by raising the average in two (multi)sets when one element is moved between the two sets. As a simple example, consider the two ...
9
votes
3answers
308 views

Knödel numbers - Find Kn

Knödel Numbers The Knödel numbers are a set of sequences. Specifically, the Knödel numbers for a positive integer n are the set of composite numbers m, such that all i < m, coprime to m, satisfy ...
-4
votes
0answers
74 views

.NET Programming Puzzles like this one from Pluralsight [closed]

Where can I find .NET programming puzzles similar to this one http://www.pluralsight.com/courses/dotnet-puzzles-type-design
20
votes
18answers
2k views

Swap capitalization of two strings

your shift key is broken. wheNever you type two lines, the cApitaL LetteRs in them get swappeD. you must write a program to fiX THIS! Description The input is two strings, s1 and s2, equal in ...
-1
votes
0answers
40 views

No base case for binary tree reversal? [closed]

Why doesn't the following Python code for reversing a binary tree need a base case? def invertTree(root): if root: root.left, root.right = invertTree(root.right), invertTree(root.left) ...
11
votes
2answers
253 views

Creasing for Loot

Introduction After a long battle, you have managed to defeat a Sphinx in a contest of riddles. The Sphinx, impressed with your skill, wishes to give you a reward commensurate with your cleverness, ...
13
votes
8answers
770 views

Alphabetic Fannkuch

Fannkuch is a classic benchmark program. The name comes from the German "Pfannkuchen"- pancakes- for the algorithm's resemblance to flipping stacks of pancakes. A Fannkuch sequence of numbers is ...
14
votes
2answers
761 views

“Write” a simple calculator without writing a single line of code

It's very easy: Create a program without writing a single line of code. The code may only consist of existing Stack Overflow questions and answers. The program should create two random numbers and ...
25
votes
10answers
2k views

Sinusoidal text

Goal: Write a program or function which prints an input string in a sinusoidal shape. The ASCII sinusoid Here is one period of the sinusoid: ....... ...
5
votes
0answers
167 views

The lost pawn problem

The lost pawn problem After the chess game ended, a surviving pawn was left behind enemy lines. let's help him find the shortest way back home. The original problem describes a nXn "chess" board, ...
41
votes
52answers
6k views

Make the Mexican Wave

In as few bytes as possible, write a program or function that outputs the following: Abcdefghijklmnopqrstuvwxyz aBcdefghijklmnopqrstuvwxyz abCdefghijklmnopqrstuvwxyz abcDefghijklmnopqrstuvwxyz ...
10
votes
5answers
214 views

CipherSaber encryption

Implement a CipherSaber encryption program, as described below. Guidelines: The smallest entry, in bytes, wins. However, in a departure from code-golf norms, you are welcome to post interesting ...
21
votes
4answers
544 views
+100

Enter your name via a D-pad

The puzzle: Consider a console/hand-held game with a d-pad where you are required to enter a name of sorts. This appeared in many older games before the use of QWERTY was popularised in consoles ...
21
votes
16answers
1k views

Calculating waves

I've been scrolling around this site for a while, but just recently got really interested in actually trying out some of the challenges. I was intending to try my hand at some of the existing ...
15
votes
13answers
479 views

Find the reference angle

This is a fairly simple question. According to this random website I found, a reference angle is the acute angle formed by the terminal side of the given angle and the x-axis. You have to write a ...
26
votes
3answers
293 views

FizzBuzz Reverse Solver

Synopsis: Given the output of a generalised FizzBuzz program, return the list of factors and words used for the program. Challenge Description Imagine a generalised FizzBuzz program that takes ...
17
votes
0answers
303 views
+50

ASCII Scores ­­­­­

Digging around in the depths of your temp folder, you find some compositions for the piano. Unfortunately, these compositions were written with note names and durations only, and you only have access ...
33
votes
21answers
2k views

What day is it (on Flooptonia)?

You are a space tourist on your way to planet Flooptonia! The flight is going to take another 47,315 years, so to pass the time before you're cryogenically frozen you decide to write a program to help ...
43
votes
7answers
2k views

Make the Stretchy Snakes Kiss

A stretchy snake looks something like this: <||=|||:)~ Each separate sequence of vertical bars (|) in a stretchy snake, known as a stretchy portion, is individually extendable to twice its ...
-6
votes
6answers
127 views

Deep thought: Levenshtein distance [duplicate]

So, blatantly plagiarizing from inspired by this challenge and its sequel, I thought I'd add another. The text to match: What do you get when you multiply six by nine The result your ...

15 30 50 per page