A competition to solve a particular problem through the usage and manipulation of strings.

learn more… | top users | synonyms

8
votes
0answers
84 views

Read a retro display

Art stolen from What size is the digit? 7-segment digits can be represented in ASCII using _| characters. Here are the digits 0-9: _ _ _ _ _ _ _ _ | | | _| _| |_| |_ |_ | ...
-1
votes
7answers
47 views

Make a search engine

You need to make a program, that when giving a list and a string, searches on the list for items that contains the string. Examples: Input: th [thing, awesome, potato, example] Output: thing ...
13
votes
23answers
597 views

Filter out and add up

Task The task is very simple. Given a non-empty string containing numbers, uppercase and lowercase letters, output the sum of the remaining numbers. For example: a1wAD5qw45REs5Fw4eRQR33wqe4WE ...
10
votes
3answers
582 views

How many words of power did I shout?

In Skyrim, the player character can use powerful magic shouts (Thu'ums) to achieve their goals. Every shout consists of three words, however, the player can use the first one or two words to achieve ...
44
votes
84answers
8k views

“99 Bottles of Beer”

Write a program that outputs the lyrics to 99 Bottles of Beer, in as few bytes as possible. Lyrics: 99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around, 98 bottles ...
13
votes
3answers
148 views

Connect the Dots

Given a series of os representing dots, connect them vertically or horizontally Examples Input: o o o Output: o---o | | o Input: o o o o Output: o---o----o | o ...
30
votes
55answers
4k views

Halloween Golf: The 2spooky4me Challenge!

A current internet meme is to type 2spooky4me, with a second person typing 3spooky5me, following the (n)spooky(n+2)me pattern. Your mission is to implement this pattern in your chosen language. You ...
25
votes
18answers
2k views

To be or not to be

In the fewest bytes possible, determine whether the two values given each match one of the following: First value 2 string or integer - whichever you prefer to case insensitive too case ...
16
votes
1answer
63 views

Parse nested digit-lead strings

The task A string S is constructed with the following process: Start with S being the empty string. Insert at some position of S a string of the form ds, where d is a nonzero digit and s is a ...
10
votes
5answers
284 views

Efficient Scientific Notation

The other day my chemistry teacher was explaining to us about scientific notation (using a small number and multiplying it by powers of ten to express large numbers more easily), which brought me back ...
14
votes
18answers
1k views

Decimal Multiplication of Strings

Given 2 inputs, a string and a decimal number, output the string multiplied by that number. The catch is that the number can be a float or an integer. You should output the string floor(n) time and ...
18
votes
26answers
2k views

Is my name official?

Introduction As ToonAlfrink says: "Me thinks there aren't enough easy questions on here that beginners can attempt!". So the task is very simple. Given a string, output a truthy or falsy value ...
30
votes
9answers
2k views

Sort these James Bond ratings

Introduction My grandpa is a fan of James Bond, but he is always unsure on how to rank his favourite actors. As such, he is always making lists, which is a lot of work. He asked me to produce a ...
21
votes
7answers
870 views

Substitute numbers by their respective letter

Create a function or program that takes a number as input, and outputs a string where ASCII-code points for the lower and upper case alphabet are substituted by their character equivalents. The ...
161
votes
372answers
27k views

“Hello, World!”

So... uh... this is a bit embarrassing. But we don't have a plain "Hello, World!" challenge yet (despite having 35 variants tagged with hello-world, and counting). While this is not the most ...
38
votes
125answers
7k views

Simple cat program

One of the most common standard tasks (especially when showcasing esoteric programming languages) is to implement a "cat program": read all of STDIN and print it to STDOUT. While this is named after ...
12
votes
12answers
1k views

Preparing a multiple choice test

Introduction Note: this is not some kind of method to encourage cheating. As Cᴏɴᴏʀ O'Bʀɪᴇɴ already said, studying is the best solution for passing a test :3. Consider the following answers to the ...
41
votes
33answers
4k views

Swap the Alphabet

In this challenge, you will be "reversing" the alphabet or swapping a-z with z-a Because this transformation makes the output look like some foreign language, your code will need to be as short as ...
18
votes
13answers
2k views

Molding ASCII art

You are given a single printable ASCII string containing no newlines, and a multiline "mold", containing spaces (), and hashes (#). You must go character by character in the string, and replace ...
14
votes
1answer
240 views

Implement the Enigma Machine

The Enigma machine is a fairly complex cipher machine used by the Germans and others to encrypt their messages. It is your job to implement this machine*. Step 1, Rotation Our enigma machine has ...
33
votes
5answers
861 views

Make Bracket Squares

Every programmer knows that brackets []{}()<> are really fun. To exacerbate this fun, groups of interwoven brackets can be transformed into cute and fuzzy diagrams. Let's say that you have a ...
45
votes
40answers
6k views

Backhanded^H^H^H^H^H^Hspaces

On some terminals, pressing backspace generates the control code ^H to delete the previous character. This gave rise to a snarky idiom where edits are feigned for comedic effect: Be nice to this ...
9
votes
2answers
118 views

Smooth vs. Chunky vs. Broken Squiggles

Based on Chunky vs. Smooth Strings. Squiggles /\_/\/\__/\/\/\/\_/\_/\ are fun to make on a keyboard when you are really bored. But not all squiggles are created equal. Some squiggles are smooth, ...
15
votes
9answers
520 views

Align function arguments on their own lines

Given an input of a string representing a function definition, output the string with newlines and spaces inserted so that the function's arguments are newline-separated and aligned. The input string ...
79
votes
125answers
21k views

Sing Happy Birthday to your favourite programming language

Your favourite programming language has just had a birthday. Be nice and sing it the Happy Birthday song. Of course you should accomplish this by writing a program in that language. The program takes ...
28
votes
10answers
1k views

Parentheses into Footnotes

Background LISP programmers have taken over the world! Parentheses have been declared as sacred characters, and from now on, they can only be used in LISP programs. It has been decided that ...
17
votes
7answers
2k views

Who's gonna win the football game?

The American football championship, Super Bowl 50, is happening today at 11:30pm UTC (and you can watch it live online). This challenge was made to celebrate it. In an American football game, two ...
16
votes
10answers
1k 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 ...
16
votes
13answers
438 views

Say What You See

The "Look and say" or "Say what you see" sequence is a series of numbers where each describes the last. 1 11 (one one) 21 (two ones) 1211 (one two one one) 111221 (one one one two two ones) 312211 ...
21
votes
9answers
833 views

“You must construct additional pylons!”

Introduction In the strategy game Starcraft 2, there are three "races" to choose from: Terran, Zerg, and Protoss. In this challenge we will be focusing on the Protoss and the iconic phrase "You must ...
18
votes
1answer
180 views

Maximal Substring Construction

In this challenge, you are passed two things: A string length, N A list of strings, L, each with an assigned point value. Any string that is not passed in has a point value of 0 You need to ...
42
votes
35answers
5k views

Spoonerise words

Given two words, spoonerise them by switching their initial consonant clusters. Fewest bytes wins. plaster man -> master plan blushing crow -> crushing blow litigating more -> mitigating ...
12
votes
4answers
307 views

All the numbers that fit in a string

Write a program or function that takes in a positive integer N. Output a list of all the distinct decimal numbers that can be written in exactly N characters using digits (0123456789), decimal points ...
11
votes
4answers
251 views

Interpret the Pig series

Given an input of a Pig, SickPig, DeadPig, QuinePig, or DeafPig program, choose one of those "languages" randomly and interpret the input as that "language." First, randomly choose between one of the ...
17
votes
14answers
2k views

Count the bytes of a program

Note 2: I accepted @DigitalTrauma's 6-byte long answer. If anyone can beat that I will change the accepted answer. Thanks for playing! Note: I will be accepting an answer at 6:00pm MST on 10/14/15. ...
22
votes
8answers
1k views

Basic Latin character name to character

Let's get back to basics! Your code, a complete program or function, must convert the official Unicode name of a printable Basic Latin character into the corresponding character. For example, for ...
11
votes
6answers
286 views

Can a fraction be simplified using Anomalous Cancellation?

Anomalous Cancellation (from Wolfram Alpha): Anomalous cancellation is a "canceling" of digits of a and b in the numerator and denominator of a fraction a/b which results in a fraction equal to ...
19
votes
43answers
2k views

Remove all occurrences of the first letter of a string from the entire string

Given an input string only containing the characters A-Z, a-z, and spaces, remove all occurrences of the uppercase and lowercase versions of the first character of the string (if the first character ...
0
votes
14answers
729 views

It's Not 2015 Anymore!

The Rules Each submission must be a full program or a function. The program must take all instances of the string 2015 from the input (1 string), replace it with <s>2015</s>* (with ...
-6
votes
11answers
142 views

Hexadecimal of a character

Given a unicode character C (or the first character of a string input), output that character's hex representation. Case does not matter. The output ranges from \u0000 to \u9999. Test cases A => ...
11
votes
12answers
2k views

Eeny, meeny, miny, moe

Introduction The childhood song Eeny, meeny, miny, moe was often used to select who was "it" when playing tag. Everyone would stand in a circle and point at one person selected at random. They ...
21
votes
14answers
2k views

Golf a string twister

How strings are twisted The twisting algorithm is very simple. Each column is shifted down by its index (col 0 moves down 0, col 1 moves 1, ...). The column shift wraps to the top. It works like ...
23
votes
39answers
3k views

Is it a pangram?

Write a function or program that takes as its input a string and prints a truthy value if the string is a pangram (a sequence of letters containing at least one of each letter in the English alphabet) ...
27
votes
24answers
3k views

Help me Open the Box

I have an ASCII-art box and I need a program to open it. Examples Input: ------- | | |_____| Output: / / / / / / / | | |_____| Specification The first line will ...
5
votes
11answers
690 views

Ode-cay Olf-gay

Write a program which accepts a sentence into stdin, and writes that sentence to stdout in pig latin. Here are some test cases which your program should handle: Input: Read your script Output: ...
26
votes
4answers
553 views

Find my word(s)!

The idea of this challenge is to find all the words from a dictionary on a grid of letters. Your input should come from stdin or function arg and will come in the following format: [your dictionary ...
16
votes
37answers
2k views

Shortest program to split a string at non-digits without RegExps

EDIT: If you're using Lisp, I have given some guidelines at the bottom in counting bytes. Objective: Make the shortest function that splits a string at non-digits and returns an array consisting of ...
27
votes
7answers
6k views

Build a twisted “Hello world!”

Your job is quite simple, write a program that prints Hello, world!, that when twisted creates a program that prints Twister!. How strings are twisted The twisting algorithm is very simple. Each ...
7
votes
2answers
105 views

The confused twister

The basic idea is to write a program that twists itself, and the twisted version untwists itself. The first program will just be the twisting algorithm described here, and when given its own source ...
41
votes
10answers
1k views

Zigzagify a String

Write a program (or function) that takes in a non-empty string of any printable ASCII characters. Print (or return) a zigzagging chain of the characters in the string with every neighboring pair of ...