Questions tagged [string]
A competition to solve a particular problem through the usage and manipulation of strings.
2,283 questions
-7
votes
7
answers
89
views
Internationalisation -> I18n (numeronym) [closed]
Golf a function returning the I18n-style numeronym for a sequence of 3+ letters, preserving case.
5
votes
4
answers
312
views
DNA reading frame
DNA is read in groups of three nucleotides (the letters you see in a sequence), called codons, for determining what protein sequence the portion of DNA will yield. I already used this in a previous ...
-3
votes
0
answers
119
views
Create a string satisfying a set of include/exclude/length constraints
Send a message containing "ZCKJSGLZD" ensuring the text length is not 9 and text length is at maximum 25 and text length is at minimum 11 and text length is at minimum 11 and text length is ...
-5
votes
14
answers
405
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 ...
-2
votes
0
answers
70
views
How to find the Longest Common Substring among command-line arguments in JS? Hardest golfing [duplicate]
I'm writing a Node.js script that takes multiple strings as command-line arguments and needs to find their Longest Common Substring (LCS). Smallest JavaScript code size wins.
Requirements:
If no ...
5
votes
13
answers
832
views
Which letter is missing? [closed]
Given a printable ASCII string, return any letter which is not present (ignoring case), if possible, else return the empty string.
Test Cases:
...
5
votes
3
answers
942
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
2
answers
227
views
Autocomplete a word at the cursor position
You will be given a block of text and a cursor position at the end of a possibly incomplete word.
You must output a suggestion for what this word (let's call it w) ...
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 ...
21
votes
10
answers
2k
views
"e" ejects the letters. Re-enter them
Overview
I have a sample of 10 quotes. You will receive as input to your program one of these quotes, however all the vowels (aeiou) will be replaced with the ...
2
votes
4
answers
597
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 ...
5
votes
3
answers
414
views
Cancel strings to make them short
Overview
You will be given a list of strings. If any two elements are equal, you can delete both of them. If one element a is a substring of element ...
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 ...
16
votes
8
answers
1k
views
Output shortest string containing all input strings
Given a list of words (letters only) in no particular order, output the shortest string containing every word (disregarding case). Output must be lowercase, except the first letter of each word is ...
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 ...