Tagged Questions

257 views

Rosetta Stone Challenge: Draw a Box Plot

The goal of a Rosetta Stone Challenge is to write solutions in as many languages as possible. Show off your programming multilingualism! The Challenge Your challenge is to implement a program that ...
325 views

Drawing 3d nets - Archimedean solids

I have a weakness for 3d nets which when cut out and folded allow you to make 3d shapes out of paper or card. The task is simple, written the shortest program you can that draws nets for the 13 ...
695 views

Breakout in half an hour

When I was a young teen I had a very boastful friend who claimed he could code up breakout (http://en.wikipedia.org/wiki/Breakout_(video_game)) in half an hour. Half an hour later he had done a great ...
345 views

Four weights to produce integer scale differences from 0 through 40 pounds

Just-in-time edit: I decided to reveal part of the answer and highlight a single aspect of the challenge. Show how 4 weights, of 1, 3, 9, and 27 lbs. can be used to produce "weight differences" ...
402 views

Secret Santa Challenge [duplicate]

Possible Duplicate: Holiday Gift Exchange Background: Secret Santa is a Western Christmas tradition in which members of a group or community are randomly assigned a person to whom they ...
233 views

Write a program that becomes slower when a single line is added [closed]

Write a program that become much, much slower on the addition of a line of code. Rules: No sleep( ) statements, please. No loops with huge LCVs. As always, may the shortest win!
327 views

m3ph1st0s's programming puzzle 4 (C/C++): “3-way swap”

My last puzzle has generated some confusion and controversy so I decided to give up, for now, on those "replace one character"-type puzzles. Hope this 4th puzzle will redeem myself after all the ...
309 views

m3ph1st0s's programming puzzle 2 (C++): “Call hard!”

I am back with a brand new puzzle for C/C++ addicts. Following the feedback received on the 1st puzzle, this time I will try to make the requirements crystal clear and to provide a perfectly valid ...
412 views

Generate a valid sequence of numbers with specific rules

The challenge The program must return a valid sequence of numbers into some rules Rules x is the size of the sequence; x cannot be less than 4 or greater than 9 (Thanks David Carraher); Digits of ...
463 views

A doubly linked list that only stores 1 pointer per element

A favorite puzzle of mine. Not massively difficult but a tad interesting. The Objective Using a low level language (C/C++/similar level) - create a doubly linked list of elements that only stores a ...
411 views

Help johnny to solve this Puzzle

Scenario Little Johnny wants to play with his friends today. But his babysitter won't let him go! After a lot of begging, the heartless nanny gives him her brand new electronic puzzle and says: "If ...
379 views

Implement half away from 0 rounding

Overview: Using you language of choice, implement a complete "half away from 0" rounding function in the shortest amount of code possible. Rules/Constraints: Direct, predefined Round-like ...
232 views

Breaking Perfect Hangman in reverse, in reverse

this is the follow-up question to Perfect Hangman in reverse golfers are now asked to develop a program that uses all rules in Perfect Hangman in reverse, instead, playing the player. the program ...
471 views

Writing String evaluation method in Java [closed]

I'm trying to write a String evaluation function i.e. evaluate("4 + 1") ; // returns 5 evaluate("4 + 1 + 3") ; // returns 8 evaluate("4 + 1 * 3") ; // returns 7 (not 15) The operators are + - / ...
408 views

Generating Binary shapes

How could we generate shapes or images using binary? I got to messing around trying to create something that looked matrix like and got to thinking, wouldn't a great CodeGolf be to see who can make ...
881 views

Rosetta Stone Challenge: Find the rule for a series

The goal of a Rosetta Stone Challenge is to write solutions in as many languages as possible. Show off your programming multilingualism! The Challenge Your challenge is to implement a program that ...
612 views

Illuminate a Mirrored Room

Goal In this competition, you are given a random room with one candle inside. The goal is to write the shortest program (this is golf) that determines what parts of the room are illuminated by the ...
621 views

Solving triangles with trigonometry

Time to dig up your old trigonometry notes from high school! The challenge is to solve the unknown sides and angles of different triangles. And as is customary in code golf, the smallest working code ...
1k views

Meta Golf Challenge

On that challenge you have to solve that challenge. Contest is over! Check the end of the question Specs: Write the smallest code (Any language*). The score of an answer is the sum of: Code ...
1k views

Check if number is a sum of consecutive numbers or not

Write a program that checks if a given positive integer can be represented as sum of two or more consecutive positive integers. Example: 43 can be represented as 21 + 22 10 = 1+2+3+4 but 4 cannot ...
697 views

Golf a mutual quine

Using two languages of your choice, write the smallest “mutual quine” you can. That is, write a program P in language A that outputs the source code for a program Q in language B, such ...
448 views

Amicable number calculator

Write a program that calculates amicable numbers, starting from [0,0], intil the maximum value for an integer is reached in the language you chose to write it in. Amicable numbers are two different ...
591 views

Manchester encode a data stream

Manchester coding is a telecom protocol used in radio communications that guarantees bit transitions at a regular interval so a receiver can recover the clock rate from the data itself. It doubles the ...
349 views

Code Golf: Number of paths!

Challenge Consider a square matrix of order N(N rows and N columns). At each step you can move one step to the right or one step to the top. How many possibilities are to reach (N,N) from ...
3k views

2k views

Print largest integer you can with the fewest characters [closed]

Find a way to output a large integer with few characters. Solutions will be scored based on the magnitude of the number and shortness of code. EDIT: Let's impose a time limit of a minute on sensible ...