13
votes
3answers
431 views

Find the shortest bracket numbers

Bracket numbers provide a simple way to express large integers using only left bracket, space, and right bracket ([ ]). A bracket number is defined as a string of one or more pairs of matching ...
17
votes
2answers
556 views

Where are the runs in this infinite string? (CCCCCC Found!)

Starting with the string ABC, consider the result of repeatedly appending the last half of itself to itself (using the larger half if the length is odd). We get the progression: ABC ABCBC ABCBCCBC ...
18
votes
5answers
1k views

Leet to English Translation

Leet to English Translation Your challenge is to write a program to translate (English) leetspeak/lolspeak/txtspk into normal English. Your program should read from standard input and output to ...
11
votes
8answers
1k views

Is it a prime? w/o math

Write a program or function in any language that tells if the input is a prime number. The input is a string representing a natural number in base-10. The output is one of the two strings "Prime" or ...
13
votes
4answers
556 views

Syntax Highlighting for Greater Golf!

Golfers. Together, we have banded together to produce code that is concise, is functionally beautiful and is uglier then the Phantom of the Opera from the original novel. The time has come for us to ...
-1
votes
1answer
301 views

Compressing a DNA-like string [closed]

my app is multiple choice test, where for each question the response results in a 4 letter string "eg" GTAC or ATGC or CATG, etc. There are always just 24 questions. so the final result is something ...
-6
votes
2answers
434 views

Implementing a Traffic Light Checker [closed]

A three-color traffic light must switch lights in the following order: red, green, yellow, red. To indicate when crossing slowly without a stop is permitted, the yellow signal may be flashed. To ...
10
votes
19answers
2k views

Remove vowels without using too many different characters

The challenge is to remove vowels (a, e, i, o, u) from string from STDIN (yes, I know, simple). You can expect that your program will be not ran with any arguments in argv. Example: This program ...
-2
votes
2answers
746 views

Conversion to palindrome with minimal points used

Input: a word (2-100 characters) Convert this word to a palindrome: delete character - 13 points add character - 12 points increase character - 5 points ('d' > 'e') decrease character - 4 points ...
1
vote
38answers
2k views

Print an n-by-n Box [closed]

Simple problem: print an n by n box from a function. A couple caveats:  -You may not use any loops  -The function must have exactly one parameter of type int (or the equivalent in your ...