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

learn more… | top users | synonyms

7
votes
2answers
86 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 ...
7
votes
0answers
48 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: _ _ _ _ _ _ _ _ | _| _| |_| |_ |_ | |_| ...
13
votes
3answers
143 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 ...
16
votes
1answer
59 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 ...
12
votes
23answers
518 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 ...
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
866 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 ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
10
votes
5answers
283 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 ...
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 ...
16
votes
13answers
435 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 ...
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 ...
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 ...
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 ...
14
votes
5answers
412 views

Translate a Glypho program

Given an input of any valid Glypho program, output its "human-readable" counterpart. Glypho is an interesting esolang idea: The instruction reference is given here. For each instruction, the ...
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 ...
11
votes
9answers
638 views

Mutually fill in the blanks

Given an input of two strings with sequences of underscores representing corresponding words, output the sentences with the "blanks" filled in. The best way to describe this challenge is by example. ...
12
votes
1answer
216 views

Are there brackets in disguise?

Someone's given us a string, but all bracket-like characters have been changed into normal ones, and we don't know which, or even how many there were. All we know is that if L1,L2,L3,...,LN were ...
33
votes
4answers
487 views

Imposters at the Zoo

You want to open a new zoo. It'll be amazing. But being the cheapskate that you are, you only want to afford three-letter animals (everyone knows that an animal's cost is proportional to the length of ...
5
votes
2answers
149 views

Implement an encoder for RFC 1924 IPv6 Addresses

Introduction Everyone should know IPv6 by now. IPv6 has very long, cumbersome addresses. In 1996 some very intelligent people created a scheme to encode them much better in RFC 1924. For reasons I ...
8
votes
5answers
198 views

Print The Formula

Introduction In chemistry there is a type of extension, .xyz extension,(https://en.wikipedia.org/wiki/XYZ_file_format), that prints in each line a chemical element, and the coordinates in the plane ...
19
votes
12answers
2k views

Coding Convention Conversion

In that Coding Golf, you should convert one coding convention with TitleCase to lower_case_with_underscores. And... vice versa! Specification Change the casing in a following way: If underscore ...
7
votes
5answers
459 views

Remove duplicate words from a sentence

In this challenge, you will remove duplicate words from each sentence. Examples Hello Hello, World! Hello, World! Code Code! Golf Code Code! Golf Code Hello hello World Hello World ...
15
votes
2answers
250 views

Exploding Cats!

Challenge You will be making a program/function that takes a string input of length n, and: Puts the kth char at the center of the space, where k = (n+1)/2. This will be the location of your ground ...
12
votes
5answers
431 views

Implement a URL shortener

URLs are getting too long. So, you must implement an algorithm to shorten a URL. i. The Structure of a URL A URL has 2 main parts: a domain and a path. A domain is the part of the URL before the ...
21
votes
15answers
3k views

Geometry is So Fun

Everybody loves geometry. So why don't we try and code golf it? This challenge involves taking in letters and numbers and making shapes depending on it. The Input The input will be in the form of ...
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 ...
49
votes
16answers
4k views

Code (Mini) Golf

Given a side-view of a mini-golf course and the power of the swing, determine if the ball will make it into the hole. A course will be in this format: ____ ____ _ __/ \ / ...
12
votes
2answers
171 views

Is it a valid consonant cluster in Lojban?

.i xu .e'o lo zunsnagri cu drani loka jboge'a Given an input of a string consisting of two characters, output whether it is a valid consonant cluster in Lojban. Here is a quote from CLL 3.6 ...
6
votes
1answer
114 views

Deciphering Option-Key Special Characters

Back-story After typing up your essay on your new Macbook, you look up at the screen and realize that you typed in ten pages of gibberish! Or is it? On further inspection, you come to find that your ...
5
votes
1answer
182 views

Create a CleverBot

CleverBot is a conversational AI that works fundamentally by repeating responses from real humans it has heard previously. It starts off pretty dumb, but once the database becomes (a lot) larger it ...
16
votes
6answers
545 views

Parse RNA into codons

Introduction RNA is the less famous cousin of DNA. Its main purpose is to control the production of proteins in cells through a process called translation. In this challenge, your task is to ...
11
votes
3answers
162 views

Read the tables

Task Read the contents of a table given a set of coordinates. Table formatting Tables will be in this basic format: |[name]|[name]| --------------------- [name]| [val]|[val] | [name]| ...
6
votes
0answers
155 views

Help me fill my wallet!

A while ago I purchased a new wallet which is able to hold 8 cards (4 on both side). However, I seem to have way more cards than that and I need to make choices on which ones I want to carry with me. ...
4
votes
1answer
129 views

Finite State Machine validity [duplicate]

I've been around for a while, watching you golf and I really enjoy it. I came up with a challenge for you all so let's begin! Challenge I assume that everyone knows what Finite State Machine (FSM) ...
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
7answers
257 views

Base Conversion With Strings

Introduction We've have a few base conversion challenges here in the past, but not many designed to tackle arbitrary length numbers (that is to say, numbers that are long enough that they overflow ...
19
votes
18answers
1k views

Convert Salesforce 15-character ID to 18-character

In Salesforce CRM, every object has 15-character alphanumeric ID, which is case-sensitive. If anyone's curious, actually it's base-62 number. However, tools used for data migration and integration may ...
10
votes
2answers
179 views

The absent-minded linguist

Background Your friend, a linguist, has recorded and analyzed some simple conversation snippets in various languages. Being quite absent-minded, they have forgotten which language each snippet was ...
15
votes
3answers
248 views

Format a list of words

Your challenge is to format a list of words across multiple lines that are no longer than a given number of characters, so that each line contains as many words as possible and no words are ...
10
votes
1answer
155 views

Inject Textual Rickrolls

Because rickrolling is the greatest meme on Earth, you [know the rules and so do I] are to write the shortest code that can textually rickroll the unsuspecting reader. Let [you down] there be an ...
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 ...
11
votes
5answers
526 views

Split a Shakespeare Script

Mr. William Shakespeare wrote plays. A lot of plays. In this tarball containing every single one of his works, each one of his plays is one long file. It needs to be split into Scenes for a stage ...