Questions tagged [string]

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

Filter by
Sorted by
Tagged with
86
votes
138answers
12k views

Determine whether strings are anagrams

Challenge Given two strings, work out if they both have exactly the same characters in them. Example Input word, wrdo This returns true because they are the ...
-3
votes
9answers
386 views

Mixed up output [duplicate]

Write a function or program that outputs the following lines <input> time: ...
8
votes
1answer
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
14answers
690 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
36answers
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
19answers
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
119answers
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 ...
24
votes
35answers
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 ...

1
36 37 38 39
40