rosetta-stone Questions
26
Solved
The challenge
The shortest code by character count to generate seven segment display representation of a given hex number.
Input
Input is made out of digits [0-9] and hex characters in both l...
Pains asked 10/9, 2009 at 20:3
15
(Edit: What is Code Golf: Code Golf are challenges to solve a specific problem with the shortest amount of code by character count in whichever language you prefer. More info here on Meta Sta...
Creath asked 7/9, 2009 at 17:25
18
Solved
I challenge you to write a mathematical expression evaluator that respects PEMDAS (order of operations: parentheses, exponentiation, multiplication, division, addition, subtraction) without u...
Blinnie asked 6/9, 2009 at 3:39
33
Solved
The challenge
The shortest code by character count to generate a wave from the input string.
A wave is generated by elevating (line-1) a higher character, and degrading (line+1) a lower cha...
Testudinal asked 3/9, 2009 at 21:29
17
Solved
I just came across this little problem on UVA's Online Judge and thought, that it may be a good candidate for a little code-golf.
The problem:
You are to design a program to assist an archi...
Prominent asked 30/6, 2009 at 21:41
34
Solved
Here's my (code golf) challenge:
Take two arrays of bytes and determine if the second array is a substring of the first. If it is, output the index at which the contents of the second array a...
Gretta asked 3/7, 2009 at 10:29
13
Solved
I've already worked out this solution for myself with PHP, but I'm curious how it could be done differently - better even. The two languages I'm primarily interested in are PHP and Javascript...
Letty asked 24/6, 2009 at 13:12
14
Solved
I made the ultimate laugh generator using these rules. Can you implement it in your favorite language in a clever manner?
Rules:
On every iteration, the following transformations occur.
H ...
Ferdelance asked 6/5, 2009 at 21:38
46
Solved
I recently posted one of my favourite interview whiteboard coding questions in "What's your more controversial programming opinion", which is to write a function that computes Pi using the Le...
Bedfellow asked 2/1, 2009 at 17:42
31
Write a program that take a single command line argument N and prints out the corresponding Roman Numeral.
Eg N = 2009 should print MMIX.
Let's say this should work for 0 < N < 3000.
...
Concision asked 27/12, 2008 at 2:21
45
Solved
Print all 12 verses of the popular holiday song.
By 12 verses I mean the repetition of each line as is sung in the song, ie
Verse One:
On the first day of Christmas my true love gave to me
...
Brunell asked 20/12, 2008 at 15:20
63
Solved
What is the least amount of code you can write to create, sort (ascending), and print a list of 100 random positive integers? By least amount of code I mean characters contained in the entire...
Antipasto asked 8/12, 2008 at 21:1
22
Solved
The code golf series seem to be fairly popular. I ran across some code that converts a number to its word representation. Some examples would be (powers of 2 for programming fun):
2 -> Two
...
Kerman asked 21/11, 2008 at 19:25
36
Solved
Generate the Fibonacci sequence in the fewest amount of characters possible. Any language is OK, except for one that you define with one operator, f, which prints the Fibonacci numbers.
Star...
Criollo asked 24/10, 2008 at 8:49
50
Solved
The goal: Any language. The smallest function which will return whether a string is a palindrome. Here is mine in Python:
R=lambda s:all(a==b for a,b in zip(s,reversed(s)))
50 characters.
...
Salinasalinas asked 23/10, 2008 at 4:17
© 2022 - 2024 — McMap. All rights reserved.