Questions tagged [string]

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

Filter by
Sorted by
Tagged with
27
votes
34answers
2k views
+100

Bubbler and 3 others are typing․․․

Task Implement a kind of "some users are typing" system, which can be found in Discord and some other chat clients. If 1 user (say, Bubbler) is typing, output ...
25
votes
19answers
2k views

Convert prefix to infix

Infix notation is a method of printing mathematical expressions where each operator sits between its two arguments, such as \$ \left(5 \cdot 4\right) + 3 \$. Prefix notation is a method of printing ...
14
votes
9answers
1k views

Convert Regex to Mask

From my CMC. Given a regex and a non-empty printable ASCII text, return one bit per character in the text, indicating the positions of beginnings of non-overlapping matches, and also the positions of ...
28
votes
27answers
2k views

Open or Close the Parentheses

Every phone needs a calculator app. Because of the limited screen real estate, the developer of mine has decided to save some buttons. Instead of having two dedicated bracket buttons - one for open <...
17
votes
14answers
4k views
+50

Write a Stack Exchange compliant brainfuck explainer

You are to take a string representing a piece of brainfuck code and Explanations, containing only printable ASCII characters and newlines ( to ...
19
votes
21answers
2k views

Alienese cycles

Alienese refers to two "languages" in the show Futurama. In actuality, they are two ciphers of English text with a pictographic alphabet. The first is a simple substitution cipher, but the ...
19
votes
19answers
2k views

Make a Scrabble Word Finder

Yes, I know there is a similar question, but this one specifically concerns any possible words, even with letters left over, while the linked one restricts to a permutation of the input Objective ...
6
votes
2answers
529 views

Bigram frequencies in text

Introduction This challenge is about producing a code to count the frequency of bigrams in a text. A bigram is two consecutive letters in a text. For instance 'aabbcd' contains the bigrams aa, ab, bb, ...
18
votes
15answers
2k views

Is it a prefix normal word?

Prefix normal words arise in the context of binary jumbled pattern matching. A binary word \$w\$ consisting of \$0\$s and \$1\$s is said to be prefix normal * if, among all of its substrings, none ...
14
votes
0answers
446 views

(t)h(e)(i)(r)(m)

Sometimes authors will write (s)he as a stand in for she or he and for some reason they don'...
17
votes
12answers
1k views

How many values of this type?

Background The number of values for a given type is called the cardinality of that type, and that of type T is written as |T|. Haskell and a few other languages ...
56
votes
47answers
8k views

Increment The Time

Every digital clock contains a small creature that has to advance the time every minute [citation needed]. Due to the popularty of digital clocks and the popularity of catching them in the wild, they ...
22
votes
19answers
3k views

Find the longest line

Given a string containing only the characters -, |, + and newline determine the longest ...
7
votes
8answers
315 views

Encrypt this Message [duplicate]

Given a permutation of the alphabet and an input string, encrypt the input string by replacing all characters with the one's you've been given. The capitalization should be kept the same and non-...
17
votes
17answers
2k views

Longest Uncommon Substring

For the purposes of this challenge a substring \$B\$ of some string \$A\$ is string such that it can be obtained by removing some number of characters (possibly zero) from the front and back of \$A\$. ...
18
votes
22answers
2k views

Parentheses Clusters

Write a program that groups a string into parentheses cluster. Each cluster should be balanced. Examples : ...
-1
votes
1answer
156 views

Find out your Ghost ghost name [duplicate]

Inspired by a tweet by Nathan W. Pyle There is, now, a standard method of converting your boring, normal human name into a mysterious, ethereal Ghost Name™️. Ably described by Mr Pyle... ...
4
votes
16answers
796 views

Written Word Equation

Word equations, but not as you know it! Given a sentence which will include two numbers, numerically, and a spelt operator, in the order seen in the examples, your goal is to give the numerical answer ...
7
votes
32answers
3k views

English An or A?

Given a string consisting of only upper and lower case letters, output an if it begins with a vowel, and a if not. For the ...
14
votes
8answers
903 views

Simplify K projections

Background K functions have a feature called projection, which is essentially partial application of values to a function. The syntax for projections is a natural extension of the regular function ...
10
votes
9answers
1k views

Implement a 2-tag system simulator

To quote http://brainfuck.org/utm.b: A tag-system transforms strings over an alphabet A = {a[1], a[2], ... a[n], a[n+1]} as follows: a positive integer ...
16
votes
14answers
2k views

When's the Listening Party?

A listening party is an event where a bunch of people get together to listen to some music (like a viewing party, but for music). In the age of the internet you can do Listening Parties online with ...
14
votes
3answers
535 views

Snap (card game)

When I was a child I used to play a variation of Snap to stake soccer trading cards. "Game" is an overstatement because the only role of the players is to secretly prepare their starting ...
8
votes
5answers
357 views

The Most Palindromy Code to Calculate Palindromy Numbers

The string abaaba Is a palindrome, meaning it doesn't change when it's reversed. However we can split it in half to make two palindromes ...
19
votes
29answers
2k views

Remove oddly nested substrings

Task: Input will consist of some text, with nested [] separating some of it into nested groups: ...
21
votes
28answers
3k views

Find me vowels near you

Write a function that takes in a string and for each character, returns the distance to the nearest vowel in the string. If the character is a vowel itself, return 0. Vowels are : ...
10
votes
4answers
328 views

Parse Ternary Lambda Calculus for correctness

Wheat Wizard has once tried to come up with a parsing problem unsuitable for regex, but it failed due to Anders Kaseorg's Perl regex answer. This is the second attempt. Now that we know that Perl ...
21
votes
5answers
1k views

Parse a lambda for correctness

The goal of this challenge is to fill a niche that is mostly lacking on this site. In my observations there most parsing verification challenges fall into two categories: Super easy parsing. This ...
5
votes
2answers
330 views

Give the minimum Levenshtein distance to a string that matches the regex

Your task, at the moment that you choose to accept it, is to write a program that, when given a string and a PCRE-regex, calculates the minimum Levenshtein distance to another string that matches the ...
12
votes
22answers
2k views

Park, Lake, Santa Fe [closed]

Given a long multi-sentence string, the goal is the count the occurrences of the following words: park, lake, ...
10
votes
32answers
1k views

Index and return 3 characters

The challenge is simple: Read 3 letters from a system input¹ and convert them to numbers (A-1, B-2, C-3...Z-26)². Print each of those numbers in the order the ...
19
votes
5answers
821 views

What if function application was right-associative?

Background In Haskell and many other functional languages, function application f(x) is simply written as f x. Also, this form ...
24
votes
7answers
2k views

Happy Birthday... caird coinheringaahing? ChartZ Belatedly?

When this question was posted, it was caird coinheringaahing's birthday! (source: 1, 2, 3, 4) (It was also World Emoji Day.) As a bit of some CGCC lore, caird's name came from a Jelly answer by Dennis ...
6
votes
6answers
377 views

Blinking Lighthouses – Founder's Day Upgrade

To celebrate the island's next Founder's Day, colored filters (fuchsia, chartreuse, and aquamarine*) have been installed in every lighthouse. All lighthouses begin operation with their fuchsia filter,...
16
votes
8answers
752 views

Polyagony layout (mode 3/3,6)

Background Polyagony is a family of hypothetical esolangs where the source code is laid out on a specifically shaped board before running it. It's similar to Hexagony, but various uniform tilings can ...
20
votes
5answers
2k views

KEYBOARD FOR MONKE!

Flavortext So...this is awkward. It seems I accidentally turned into a monkey last night after eating one too many banana sundaes. This has made many things inconvenient, especially typing. You see, ...
10
votes
42answers
2k views

Which character to change (Robbers)

Cops thread Robbers, your task is to crack a cops answer. Reveal the character that should be changed and what it should be changed to too. Please notify the cop if you cracked their challenge. The ...
18
votes
44answers
3k views

Which character to change (Cops)

Robbers Thread Cops, your task is to chose a program that prints a string (you can choose). Although, if you change 1 character in your code, it should print another string. But there's a twist: You ...
23
votes
8answers
2k views

Blinking Lighthouses

Lighthouses on an island have blink codes that let ships know which lighthouse they are seeing. Input should be strings of S and L. Here is a (Python) example of codes for 4 lighthouses as a list of ...
7
votes
25answers
3k views

Generate this huge right triangle

Your task is to print out this exact text: ...
25
votes
17answers
1k views

r flag my Vyxal

Vyxal is a stack-based language, meaning that everything operates by popping and pushing values onto a stack. It has a bunch of useful flags, one of which is r. ...
25
votes
23answers
2k views

Help Alice fix her text!

When Alice was touch typing on her QWERTY keyboard (Figure 1), she accidentally shifted both of her hands rightwards by one key, so q became ...
7
votes
7answers
373 views

Fix Facebook exported JSON

When you export data in JSON from Facebook, the multi-byte Unicode characters are broken. Example Unicode characters and their representation inside JSON: ...
12
votes
4answers
563 views

Leave the times out!

Everyone knows, that you can leave out the multiplication symbol (\$\times\$, or *) in a*b ...
19
votes
21answers
3k views

Draw a mountain given altitude

Take an array of nonnegative integers, such as [1, 0, 0, 1, 2, 4, 2, 0]. Then, draw that as a mountain where the integers represent altitude: ...
18
votes
11answers
2k views

Count my Pluses

Your task is, to count how many pluses I have. What Pluses? The no plus: 0 Points - The naïve Plus: 1 Point + The double ...
1
vote
0answers
54 views

Reverse a sentence word by word [duplicate]

The setting "Well I actually wrote the sql library they, the maintainers actually.." "Right, but do you have any experience working with django?" " ...no I don't use ...
17
votes
11answers
1k views

Print instructions for typing \` in chat

Background As far as we can tell from trying everything (besides cheating with ZWSPs), you can't type `\ in Stack Exchange chat. However, you can type ...
16
votes
7answers
1k views

Drop some boxes

Say I have a pile of boxes: AAA BBB I can create it in two steps: BBB ↓ (empty) --- AAA ↓ BBB But with this: ...
7
votes
1answer
163 views

Jump trajectory

This is an ascii-art challenge where you will draw ascii-art showing a person "jumping" off the top of a building. The building Input given will be a group of rectangular buildings. You may ...

1
2 3 4 5
40