Questions tagged [string]
A competition to solve a particular problem through the usage and manipulation of strings.
2,057
questions
-3
votes
9
answers
391
views
Mixed up output [duplicate]
Write a function or program that outputs the following lines <input> time:
...
8
votes
1
answer
1k
views
Random Sentence Generator
Write the shortest program you can in any language that reads a context-free grammar from and the number of sentences to produce from stdin, and generates that many ...
12
votes
15
answers
705
views
Finish a symmetrical map
You are given one-quarter of a map that is symmetrical over the x- and y-axes as input. The program should print the complete map.
The map can contain the following characters: ...
17
votes
36
answers
1k
views
Sum of integers in string, separated by non-numericals such as 'a' and 'Y'
Create a program which sums all integers found in a string which is set as a variable in the program (thus, the program doesn't have to handle any input). The integer numbers are separated by non-...
24
votes
20
answers
2k
views
Chris Pine's "Deaf Grandma"
I'm a mentor at RubyLearning and one of the exercises we give to our students is the "Deaf Grandma" exercise from Chris Pine's book "Learn to Program". Here's the description:
Write a Deaf Grandma ...
63
votes
121
answers
10k
views
Reverse stdin and place on stdout
Requirements:
Take an input on stdin including new lines / carriage returns of unlimited length (only bounded by system memory; that is, there is no inherent limit in the program.)
Output the reverse ...
25
votes
35
answers
2k
views
Finding "sub-palindromes".
The shortest code that finds all unique "sub-palindromes" of a string, that is: any substring with length > 1 that is a palindrome.
eg.1
...