Questions tagged [string]
A competition to solve a particular problem through the usage and manipulation of strings.
2,283 questions
11
votes
17
answers
916
views
Identify Redundant Regex
A redundant regular expression (regex) is defined here as a regex which has some amount of characters which can be removed while not affecting its functionality -- i.e. it matches the exact same set ...
-7
votes
8
answers
308
views
Internationalisation -> I18n (numeronym)
Write the shortest program or function that accepts a sequence of three or more letters and returns its I18n-style numeronym, preserving the original letter case. The I18n-style numeronym is formed by ...
-5
votes
14
answers
444
views
Text Flattening Program
Input: A string, can be multi-line. The newlines must to be real newline (e.g., you cannot request that each newline be (n)). There is another input, a number (not ...
5
votes
3
answers
976
views
Multiply the input by 2
Your goal is to write a program which will take an input and multiply it by 2. However, there are some catches.
You will get an input in one of a few forms:
A number (...
12
votes
15
answers
2k
views
Unroll the loop!
A loop is a rectangle of text like this:
hgf
ile
jkd
abc
To unroll it, you start at the bottom left, and proceed to the right, spiralling anti-clockwise in towards ...
2
votes
4
answers
619
views
Program Generator: Print a Paragraph
Objective
Your challenge is to write a program that, given a paragraph from a book, will output another program that prints out that paragraph. (See my example program in an answer)
Scoring
The link ...
9
votes
11
answers
2k
views
Recognize my coworker
My work has recently changed the employee tracking system to one that happens to include a fun game to learn your coworker's faces:
Just a small problem: all the pictures include that person's ...
12
votes
3
answers
2k
views
The shortest NP-complete problem
Find an NP-complete problem that covers all finite ASCII strings, and present a solver for the problem in the programming language of your choice.
By the definition, if there is a finite ASCII string ...
4
votes
4
answers
218
views
Shortest TeX document that generates ``Overfull \hbox`` Warning
Attempt to produce the shortest TeX document that generates the warning
Overfull \hbox (<x>pt too wide) in paragraph at lines <y>--<z>
that ...
21
votes
20
answers
3k
views
Albuququerquerquerquerque challlengenge
Introduction
Esolangs.org user "Tommyaweosme", after getting 3-4 hours into a 17-hour video called "albuquerque but every time a word repeats it loops (normal speed)", created this ...
12
votes
14
answers
1k
views
Decide Equality of Closed Surfaces
Objective
Given two closed surfaces (a.k.a. closed 2-manifolds), decide whether they're homeomorphic.
Introduction
In lay terms, a closed surface is a finite-sized shape that resembles a flat plane ...
16
votes
12
answers
990
views
Repetition-restricted strings
Given an alphabet size, \$n>0\$, and an occurrence limit, \$k>0\$, produce the number, \$a(n, k)\$, of strings that may be constructed from the \$n\$ letters in the alphabet which have no more ...
6
votes
5
answers
723
views
Interpret a SqueezeL string
Interpret a SqueezeL string
SqueezeL is a golfing language I'm developing. Its main distinguishing feature is its 40 character code page, which led me to create a semi-complicated encoding method for ...
23
votes
16
answers
2k
views
Print the largest hidden double
Given a string of space delimited words, find the longest word such that, when that word is replaced with spaces, it is still a subsequence of the remaining string. Then, replace everything, except ...
11
votes
6
answers
1k
views
Tracing light through a house of mirrors
Suppose you find yourself in a house of mirrors! You stand in the corner, and you trace how your image reflects off of mirror A, followed by mirror B, followed by mirror C, followed by mirror A.
But ...
9
votes
17
answers
1k
views
Spellcheck I Before E
Background
As the old saying goes, "I before E, except after C". Whilst we already know exactly how true that saying is, I am a stickler for sayings, especially those that rhyme. I want you ...
7
votes
8
answers
997
views
Solve the "word break problem" in a single line of code
Challenge
Solve this problem in the fewest number of bytes of code possible.
Write code that takes a string \$str\$ and a dictionary-list of words \$d\$ and finds all combinations of words from \$d\$ ...
17
votes
10
answers
2k
views
Convert French spelled out numbers to integers
Given a string that is a number between 0 and 100 (included) spelled out in French, write a function (or a whole program) that outputs the corresponding integer.
List of all test cases :
...
7
votes
15
answers
2k
views
`Vo we l spa ci ng`
Today you are having a silly problem.
...
14
votes
13
answers
1k
views
Simplified canvas builtin
related
The golfing languages 05AB1E and Vyxal have a "canvas" builtin that draws a string on a ASCII grid. In this challenge, you'll be implementing a simplified form of this.
You should ...
7
votes
2
answers
355
views
Snake a string through a simplex
An n-simplex is a generalization of 'triangleness' in any dimension (specifically, it is the simplest shape requiring n dimensions). Starting with 0 dimensions, the named simplexes are: point, line ...
7
votes
8
answers
670
views
Curry a C function pointer [closed]
Objective
Given a type signature of a C function pointer represented as a string, output the (fully) curried version of it, also as a string.
I/O format
It is assumed that:
There is at least one ...
3
votes
1
answer
226
views
How comparison-heavy is this list? [closed]
Given a list of strings in any convenient format display the amount of comparisons between individual characters that a merge sort algorithm would perform.
The merge-sort algorithm is a divide & ...
9
votes
12
answers
3k
views
Keyboard Ping Pong
Keyboard Ping Pong
(This question was inspired by this post.)
Challenge
Given a string of letters, determine if the word "ping-pongs" across the keyboard. (Letters alternating between sides ...
1
vote
2
answers
277
views
Write a function that takes an input string and encodes it using a modified Fibonacci sequence in reverse [closed]
Given an input string, first convert each character to its ASCII value.
Generate a reversed Fibonacci sequence of the same length as the input string.
Encode each character by adding its ASCII value ...