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

learn more… | top users | synonyms

20
votes
2answers
433 views

On this site we obey the laws of thermodynamics!

And in particular the second law: the entropy of an isolated system increases over time. For this challenge, An "isolated system" will be taken to be a program or function (abbreviated as "program" ...
24
votes
19answers
3k views

Head, Shoulders, Knees and Toes, Knees and Toes

Introduction: I think we all know it, and it has probably been translated in loads of different languages: the "Head, Shoulders, Knees and Toes" children song: Head, shoulders, knees and toes, ...
0
votes
0answers
105 views

“I am Lord [name]” anagram generator [on hold]

In Harry Potter and the Chamber of Secrets we see that Tom Marvolo Riddle is an anagram for I am Lord Voldemort. Task Write a function that the user can pass 2 string arguments to as inputs: the ...
19
votes
6answers
1k views

Magic mirror madness

Introduction I have a room full of magic mirrors. They are mysterious artifacts that can duplicate any item, except another magic mirror. More explicitly, a duplicate version of the item will appear ...
22
votes
23answers
2k views

Alphabetically permute a string

Task Your goal, should you choose to accept it, is to write a program, that, given an input string (or array of characters), outputs every possible permutation of the letters in that string. I'm ...
6
votes
5answers
331 views

Build me a brick road! [duplicate]

I need help making a brick road to go beside my brick wall! \ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \__\ \...
0
votes
0answers
57 views

French Conjugation code [duplicate]

If you've ever studied a language you will know what conjugation is. It is a verb changing form because of a pronoun an example in english is "I run" and "He runs". We will be doing french ...
-2
votes
0answers
78 views

Green but no Red [on hold]

Goal: print the word "Red" using all the letters in the word "Green" that are not in the word "Red." Reserved words do not apply, and do not count towards spelling "green" or spelling "red." You can ...
0
votes
0answers
62 views

String Addition (Adding a Maximum of 9+9+9) [duplicate]

The Challenge You must create a program that does addition using string manipulation, similar to: 999 + 1 ---- 1000 Which means the maximum amount of addition possible is 9+9+9. And your code ...
19
votes
20answers
2k views

The Art of Word Shaping

The Art of Word Shaping Given a binary matrix, and a string of letters, replace all 1's in the matrix from left, to right with the letters of the string. Once the letters have been formed into the ...
33
votes
8answers
2k views

Draw diagonal lines of text

Given an input of a list of words, output the words with their letters arranged diagonally: p r o p g u r z a a z m n l m d e i c s n o g d g e o l f (The ...
5
votes
2answers
299 views

Why don't you grow up?

Why don't you grow up? In the past week a meme involving the young actor Aaron Bailey became trending in most Brazilian social networks. Entitled "why don't you grow up" it consists in repeating a ...
16
votes
7answers
503 views

Blueprint a sestina

A sestina is a format of poem that follows an interesting pattern that we can generate. It has six stanzas of six lines each, where the last words of each line in the first stanza make up the line ...
12
votes
8answers
408 views

Add weight to one side of a see-saw to balance it

Balancing Act A see-saw (supposedly from the French 'ci-รงa', meaning 'this-that') forms a third of the holy trinity of playground equipment, along with the similarly ubiquitous slide and swing. A see-...
-5
votes
2answers
82 views

Friday 11/11/2016 11:11:11PM PST [duplicate]

As of posting this question, the date/time was: Friday 11/11/2016 11:11:11PM PST Wow, such a rare occurrence! This definitely deserves a challenge made for it! Your task is to print the following: ...
4
votes
3answers
384 views

Identify the IP address

Identify whether the IP address is internal, global, link-local, or reserved. Input should be an IPv4 address in decimal octets separated by periods. Output should be 0 for link-local (RFC 3927), 1 ...
-3
votes
1answer
143 views

“L” the string! [duplicate]

Given a string, print the string "L"ed. First, print it: ABCDEF Then, change the first character to the second character: ABCDEF BBCDEF Then, change the first two characters to the third one: ...
9
votes
32answers
1k views

Find the “unwrapped size” of a list

Let's define the "unwrapped size" function u of a nested list l (containing only lists) by the following rules: If l is empty, then u(l) is 1. If l is non-empty, u(l) is equal to the sum of the ...
5
votes
0answers
151 views

Solve a Single Player Tron Game [closed]

Solve a Tron Game Tron is a great game, and if you haven't played it the internet has MANY online versions available. A fun challenge is to try to write an AI that plays Tron, which is normally much ...
15
votes
10answers
1k views

Print a ballot!

As you all know, today is election day! Your task today is to print out a ballot, given an input. If the input is Hillary Clinton, print: Hillary Clinton ===-----===> Donald Trump === ...
4
votes
1answer
97 views

Reverse an xxd hexdump [duplicate]

Given an xxd hexdump such as this one: 00000000: 1f8b 0808 4920 2258 0003 7069 6c6c 6f77 ....I "X..pillow 00000010: 2e74 7874 00d3 d707 8218 10d0 2799 c545 .txt........'..E 00000020: ba96 41a1 994c ...
2
votes
4answers
90 views

Character by Character [duplicate]

Your program must take in a string like: test string And must output each character adding one at a time like this: t te tes test test test s test st test str test stri test strin test string ...
65
votes
75answers
14k views

Build me a brick wall!

Challenge I need help building a brick wall! Throw together some code for me using no input and produce the following output wall shown below: _|___|___|___|___|___|___|___|___|___|___|___|___|___|...
105
votes
45answers
22k views

GO OUT AND VOTE

Today is November 8th, 2016, Election Day in the United States of America. If you are a U.S. citizen eligible to vote, then go out and vote if you haven't already before answering this challenge. Do ...
15
votes
25answers
1k views

Product catalog

This problem is about separating a string representing a product identifier into three components. The first part consists of upper and lower letters of arbitrary length which represents the ...
20
votes
14answers
3k views

Operator ASCII art

Challenge Given an ASCII operator from the list below and a number n, draw an ASCII representation of the operator using that operator as the character with the line segments of the operator having ...
15
votes
31answers
2k views

Draw a hollow square of # with given width

I got this challenge from Codingame and am curious about better solutions than mine: Given a width via standard input draw a hollow square of '#' in given width and length. Example: 5 results in ##...
18
votes
4answers
371 views

Given a Diagram, Find X

Find X I was inspired by math questions in which one is asked to "Find X" for a given shape. Originally, I was just going to have the challenge be to print the x and y location of the character 'x' ...
23
votes
9answers
742 views

Primenary Strings

A Primenary (binary-prime) string is one which, when written as a binary grid, every row and column has a prime total. That's quite a vague explanation, so let's break it down with a worked example.....
10
votes
16answers
1k views

Wait… what was I going to say again?

I often forget what I wanted to say when the teacher calls on me to speak. Can you make me a tool to solve this? Requirements: The program must loop as follows: First, take in input If the input is ...
12
votes
6answers
213 views

Minimum insertions to make palindrome

Today you will be doing another palindrome challenge! So, your task today is to take a string, and determine the minimum amount of letters required to insert to turn it into a palindrome. For ...
27
votes
39answers
3k views

Print a letter Fibonacci

Given N (2 <= N), print N lines of the letter Fibonacci series like this (i.e. N = 5) First, start with a and b: a b Next, add the two lines. a b ab Keep adding the last two lines. a b ab bab ...
7
votes
8answers
293 views

What degree is this palindrome?

Your task is to determine the palindromic degree of a given non-empty string. To do this, loop until one of the following conditions are met: The string is not a palindrome. You encounter a string ...
11
votes
11answers
374 views

Square-unspiral the string!

Given a string, first square it as follows: First, write the string. abcde Next, write the string rotated one left. abcde bcdea Keep doing this until you have written len(string) lines. abcde ...
10
votes
5answers
260 views

How many significant figures?

Given a number as input, determine how many significant figures it has. This number will should be taken as a string because you have to do some special formatting. You'll see what I mean soon (I ...
25
votes
18answers
1k views

Pairable strings

A string is pairable if it can be split into subtrings, each of which is a string repeated twice consecutively. For example, aabaaababbbaba is pairable as: aaba aaba b b ba ba Given a non-empty ...
12
votes
2answers
304 views

Animate Adve the Adventurer

The challenge Your task is to animate Adve the Adventurer moving through a creepy (i.e. Halloween) maze. Adve is a โ€ข; he's character fluid, though, so he does not mind being represented by a ...
32
votes
32answers
2k views

Interlace strings

Your challenge is to write a program or function that, when given two strings of equal length, swaps every other character and outputs/returns the resulting strings in either order. Examples "Hello,"...
-2
votes
0answers
77 views

from another string? Is this string rotated [duplicate]

Given two strings, determine if the second string is rotated from the first string, and print a truthy or falsey value accordingly. Test cases "Hello world", " worldHello" -> True "abcdefg", "...
8
votes
21answers
507 views

Encode the column cipher

Given a string to encode, and a number of columns (the key), encode the string as follows: I will be using the example Hello, world! and the key 3 First, write out the number of columns: 1 2 3 ...
15
votes
32answers
1k views

Encode the alphabet cipher

Given a string that contains lowercase letters, encode that string with the alphabet cipher. To encode with the alphabet cipher (I will be using the example hello): First, convert each letter in the ...
16
votes
16answers
812 views

Find the Wavy Words!

(Note: this is an easier spin-off of my previous challenge Find the Infinity Words!, which is a spin-off of my other previous challenge Find the Swirling Words! :) ) Definition of a Wavy Word: If ...
27
votes
19answers
2k views

The Rule of Thumb for Title Capitalization

According to this site a general rule recommended by The U.S. Government Printing Office Style Manual is Capitalize all words in titles of publications and documents, except a, an, the, at, by, ...
128
votes
107answers
26k views

Trick or Treat polyglot

Since Halloween is coming up I though I might start a fun little code golf challenge! The challenge is quite simple. You have to write a program that outputs either trick or treat. "The twist?" you ...
24
votes
19answers
2k views

Alphabet Diamond

Alphabet Diamond You've seen the amazing alphabet triangle, the revenge of the alphabet triangle and now it's time for the revenge of the revenge of the alphabet triangle! Introducing... THE ...
4
votes
8answers
242 views

Translate English Characters to the Emoji Flag Alphabet

Introduction Emoji use a particular alphabet for their national flags, which allows one to put two symbols together to create the appropriate flag. ๐Ÿ‡ฆ๐Ÿ‡ง๐Ÿ‡จ๐Ÿ‡ฉ๐Ÿ‡ช๐Ÿ‡ซ๐Ÿ‡ฌ๐Ÿ‡ญ๐Ÿ‡ฎ๐Ÿ‡ฏ๐Ÿ‡ฐ๐Ÿ‡ฑ๐Ÿ‡ฒ๐Ÿ‡ณ๐Ÿ‡ด๐Ÿ‡ต๐Ÿ‡ถ๐Ÿ‡ท๐Ÿ‡ธ๐Ÿ‡น๐Ÿ‡บ๐Ÿ‡ป๐Ÿ‡ผ๐Ÿ‡ฝ๐Ÿ‡พ๏ฟฝ...
50
votes
17answers
3k views

Fill in the Minesweeper clues

Minesweeper is a popular puzzle game where you must discover which tiles are "mines" without clicking on those tiles. Each tile is either a mine (represented by *) or a clue, i.e. a number from 0 to 8 ...
14
votes
6answers
326 views

Let's get ready for Halloween

I don't know about you all but I'm not preparing for Halloweenโ€“โ€“never did never willโ€“โ€“but, my neighbor is, so we'll help her out. She needs help figuring out which brand of candy she has, but she has ...
18
votes
9answers
580 views

Balanced triplet brackets

A "triplet bracket" (that I made up for this challenge) is one of the following: (...+...) [...:...] {...|...} <...-...> A balanced triplet bracket string (BTBS for short) is either an empty ...
34
votes
28answers
7k views

Take a ride on the Reading, If you pass Go, collect $200

Monopoly Board For this code-golf challenge we will be building the board game Monopoly. Rules: Take no input. Output a 11x11 board where each ASCII character forming the board is the first letter ...