A code challenge is a competition for creative ways to solve a programming puzzle with an objective winning criterion not covered by other scoring tags (e.g. code-golf).

learn more… | top users | synonyms

2
votes
0answers
278 views

Draw A Snowflake

Joe lives at the Bahamas. It is winter. His children are disappointed that there is no snow. Joe needs to make snow for his children. Fortunately, he has a 3-d printer. He plans to make snowflakes ...
11
votes
3answers
1k views

Computer: you do the math

This challenge is partly an algorithms challenge, involves some math and is partly simply a fastest code challenge. For some positive integer n, consider a uniformly random string of 1s and 0s of ...
4
votes
2answers
653 views

Coding a recursive function for highest possible input

Challenge You are given the following function:- which is the same as:- with the base cases q(r, b, L) = 1 whenever r ≤ L, q(r, 0, L) = 0, if r > L and q(r, 0, L) = 1, if r ≤ L. Your task is to ...
21
votes
3answers
924 views

Program a Racing Car

Your task is to write a small program that can drive a racing car fast. NEW Simple Track. Rules Your program will read in an image of the track. You can start your car on any yellow pixel, and you ...
14
votes
3answers
1k views

Distinguish between Masculine and Feminine Nouns in French within 100 characters

You are to write a very small program within 100 characters. Your program must distinguish between masculine and feminine french nouns. The output should be un if it is masculine and une if it is ...
7
votes
2answers
555 views

Divide food to the poor equally!

The problem Through a terrible procastination accident you are reborn as Scrooge McDuck for a day. To make the most out of the situation you decide to give away food to the poor. Since you also are a ...
8
votes
5answers
578 views

Smallest Bytecode Interpreter/VM

Leaderboard - JIT Compiled (Lower is better) es1024 - 81.2 points (including a working compiler!) Kieth Randall - 116 points Ell - 121 points Leaderboard - Interpreted (Lower is ...
11
votes
5answers
357 views

Generalized Gematria Calculator

Create a bidirectional Gematria calculator, for any given sequence of Unicode characters as the alphabet. Gematri-What? Gematria is a system of assigning numerical values to symbols, developed by ...
27
votes
12answers
3k views

Say Hello to the Pioneers of Computer Science

Choose your favorite famous computer scientist or computer science pioneer who was born in 1942 or earlier (as 1943 marks the start of the creation of the 'first' computer). They should have a ...
20
votes
6answers
2k views

Find the largest fragile prime

Consider the function Remove(n, startIndex, count) that removes count digits from the number n starting from the digit at position startIndex. Examples: Remove(1234, 1, 1) = 234 Remove(123456, 2, 3) ...
7
votes
1answer
355 views

Digesting Polygons

Digesting a polygon is a process in which you take an input polygon, and create another polygon that can contain the entirety of the input polygon, while having one side less than it. The goal of ...
28
votes
14answers
3k views

Sudoku Compression

Your job is to write a program (or two separate programs) in any language that: Can take a completed Sudoku board as input (in any logical format) and compress it into a string of characters Can ...
10
votes
4answers
673 views

Tiling, given vertex configuration

Task The task is to tile polygons, given a vertex configuration. Scoring Your score is equal to the "complexity level" your submission reaches. Complexity levels are cumulative, meaning that to ...
44
votes
6answers
4k views

Let's Judge Some Books By Their Covers

Everyone knows that the content makes the question. But a good title helps too, and that's the first thing we see. It's time to turn that first impression into a program, and figure out what kinds of ...
5
votes
0answers
216 views

Tic-Tac-Toe and Chess, with fewest [distinct] characteers

In this form of the game Tic-Tac-Chec, the goal is to move chess pieces to get four-in-a-row. Your goal here is to figure out if a position has a winning move. Rules The rules are similar, but not ...
19
votes
4answers
1k views

The Fatal Error Challenge

Objective Write a routine that accepts a string of printable ASCII characters, s, and returns a string containing the same characters as s, reordered so that no two-character substring appears more ...
9
votes
3answers
1k views

Find highest scoring matrix without property X

This challenge is partly an algorithms challenge, partly an optimization challenge and partly simply a fastest code challenge. A cyclic matrix is fully specified by its first row r. The remaining ...
60
votes
9answers
5k views

Counting Grains of Rice

Consider these 10 images of various amounts of uncooked grains of white rice. THESE ARE ONLY THUMBNAILS. Click an image to view it at full size. A: B: C: D: E: F: G: H: I: J: Grain ...
11
votes
5answers
609 views

RadioASCII Elements: Output the elements of the periodic table while slowly losing characters

Here is a list of the 118 (current) elements of the periodic table (in a collapsed Stack Snippet for your convenience): Hydrogen Helium Lithium Beryllium Boron Carbon Nitrogen Oxygen ...
21
votes
5answers
1k views

Sort a List With Swaps and Pops

Consider a randomized list of the integers 1 to N. You want to sort it using only the following actions: Swap the first and last list elements. (S) Pop off the first element and append it to the end ...
10
votes
2answers
746 views

Are You the One? (Mastermind Derivative)

I've got a tough one for you! My girlfriend recently came across a new show on MTV (USA). It's a terrible show, and everyone on it is trashy, but the "game" is pretty interesting. From Wikipedia: ...
4
votes
8answers
553 views

Leave your mark!

In this challenge, you'll need to edit a grid of characters to make a program that does a task, while ensuring that you leave a lasting mark on the grid. Task The task to perform is determined by ...
11
votes
3answers
2k views

Onion Programming

Using only printable ASCII (hex codes 20 to 7E), write a square N×N core program without comments that is surrounded by 4 more layers, creating a (N+8)×(N+8) square program (N > 0). For N = 3 the ...
63
votes
88answers
11k views
+100

ASCII's 95 Characters…95 Movie Quotes

In 2005 the American Film Institute produced AFI's 100 Years...100 Movie Quotes, a list of the best quotes in American cinema. Here they are listed exactly as they should be used in this challenge: ...
4
votes
2answers
376 views

The Mirror Maze Mania

Puzzle There are some mirrors located throughout a grid. A ray of light enters the grid from some position. It travels through the grid in a straight line trying to escape. On encountering with a ...
6
votes
1answer
345 views

Make your country proud!

You are from the tiny country of Que-Wopistan. The Que-Wopistonion's are a proud people, and every Que-Wopistonian dreams of making their country proud by representing their country in the Olympics. ...
5
votes
1answer
318 views

Invent your own Unicode 7.0.0 encoding (as efficient as possible)

As you may know, the Unicode standard has room for 1,114,111 code points, and each assigned code point represents a glyph (character, emoji, etc.). Most code points are not yet assigned. Current ...
13
votes
2answers
584 views

Choose-Your-Own-Language Code

Let's take a grid of 16x16 printable ASCII characters (code points 0x20 to 0x7E). There are 30-choose-15 paths from the top left to the bottom right corner, making only orthogonal moves, like the ...
3
votes
0answers
152 views

Crafting Canonically Cöcher Crosswords

The Setup Most of us are familiar with crossword numbering, which follows three basic rules: in a character grid consisting of blacks and whites (see below), any maximal contiguous horizontal or ...
159
votes
167answers
23k views

Evolution of “Hello World!” (testing new type of challenge)

The challenge is to make a program that prints Hello World! to stdout. The catch is that your program must have a Levenshtein distance of 7 or less from the program in the answer submitted before ...
20
votes
10answers
1k views

Short Deadfish Numbers

Deadfish is one of the best known non Turing-complete programming languages. It has only one accumulator (which starts at 0) to store data, and only four commands: i - Increment the accumulator s - ...
17
votes
3answers
1k views

Hungry Image Snake - Hole #3

Hole #1 Joe the snake is hungry. He eats pictures, one pixel at a time. He really likes bright pixels. The Challenge Program Joe to eat the most bright pixels he can find, given that he can only ...
13
votes
3answers
984 views

Write a square program that outputs the number of times it has been “unrolled”

Consider a square block of text, N characters wide by N tall, for some odd integer N greater than 1. As an example let N = 5 and the text be: MLKJI NWVUH OXYTG PQRSF ABCDE Notice that this is the ...
36
votes
13answers
4k views

Programming with a Sporadic Shift Key

There's something wrong with your keyboard. The Shift key has a mind of its own. Every time you type a character you have no idea whether it will come out shifted or not (though it is 50-50). Besides ...
6
votes
2answers
390 views

Turn nouns into plurals

Your task is to take as input an English noun and output its plural. To win the challenge you must trade off code length against accuracy. Entries will be scored according to this comma-separated ...
24
votes
6answers
2k views

Swipe Type Converter

The next revolution in typing on laptops was released on the first of April, 2014 by SwiftKey. However, I want to be the first person to write a swiping nano clone, but, as I can't find a good ...
7
votes
2answers
198 views

Stabilize a Brick Structure

Bricks and Stability Defined This question uses the same definition of bricks and stability as Is the brick structure stable? Let [__] represent a masonry brick and . . ...
21
votes
8answers
2k views

Prolific Perfect Pangram Programs Pertaining to Printable ASCII

Updates: Time limit removed. You must be able to describe output - see new rule. A pangram is a sentence that uses every letter in the alphabet at least once, such as: The quick brown fox ...
15
votes
2answers
490 views

Construct n-gons with a ruler and compass

The task is to draw a regular polygon of n sides using only a compass and an unmarked ruler. Input (n) is one of the following 10 numbers: 3, 4, 5, 6, 8, 10, 12, 15, 16, 17. Method: Because you only ...
4
votes
7answers
1k views

The Reaction Time Game

Game The game is simple. Test the user's response time by asking them to enter the correct value that is displayed on the screen in the shortest time possible. Each round of the game will be as ...
3
votes
5answers
410 views

Find X in a partially sorted Array

Your job is to find the location (read index) of a given element X in an array gone through the following transformation process: Take a fully sorted integer array of size N (N is known implicitly) ...
21
votes
4answers
2k views

Enclose 1009 pixels

Output is a shape that encloses 1009 pixels. The shape must take the form of a single, closed, non-intersecting loop. Input is a positive non-zero integer. Each input must yield output that is ...
7
votes
3answers
442 views

Help me with trigonometry!

Thank you guys so much for your help with calculus. Now I need some help with my upcoming trigonometry test. On the test, I'll need to simplify expressions. I’ll be given input like 4sin(x)/(2cos(x)) ...
12
votes
8answers
672 views

Comment-free polyglot

Polyglots are programs that are valid in multiple programming languages simultaneously. Most such polyglots are written in such a way that certain constructs of one language are interpreted as ...
5
votes
4answers
680 views

Un-hash the Java Hash

Hash Un-hashing The basic goal of this challenge is to exploit the high probability of collision in the Java Hash function to create a list of plausible inputs that created an outputted hash. The ...
15
votes
4answers
812 views

Program a 2048 AI using an existing Framework

EDIT : Recently, my question has been proposed as a duplicate of 2048 Bot Challenge. I would like to stress that this question is different from that question, and will require answers to be ...
10
votes
4answers
912 views

5 Seconds to Find Pie

Pi times e (or Pie if you like ambiguous notation) to 100 decimal places is: 8.5397342226735670654635508695465744950348885357651149618796011301792286111573308075725638697104739439... (OIES A019609) ...
8
votes
1answer
424 views

Frogger Champion

The Game Most of us know about Frogger, the 80's era arcade game where the objective is to hop a frog safely across a busy highway and a hazard-filled pond to arrive safely at home. A challenge was ...
3
votes
2answers
419 views

Rolling digital number lock [duplicate]

There's a simple digital number lock. After each button press the lock checks if the previous four presses constitute the correct code. I.e. typing 44445 tests two codes: 4444 and 4445. You must brute ...
8
votes
7answers
2k views

The Bowlers-Golfers Fraction War

Introduction Let's start by arranging all fractions from 0 to 1 in order of lowest denominator, then lowest numerator: 1/2, 1/3, 2/3, 1/4, 3/4, 1/5, 2/5, 3/5, 4/5, 1/6, 5/6, 1/7... Note that ...