Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

All Questions

24
votes
18answers
5k views

PronunciationSort™

We all know of different fancy sorting algorithms, but none of these give us numbers in a way that's easy to pronounce. To remedy this, I propose using PronunciationSort™, the most natural way to sort ...
2
votes
1answer
180 views

I won't not use no double negatives [closed]

The goal is to simplify sentences containing multiple negatives. Like with multiplying negative numbers, two negative words annihilate each other until at most one is left (doesn't matter which one). ...
31
votes
12answers
2k views

Pleasanortmanteaus

A portmanteau word is a combination of two words that takes part of each word and makes them into a single new word. For example, lion + tiger => liger. Let's write a program to generate portmanteaus ...
11
votes
1answer
296 views

Self-enumerating pangrams

Pangrams The quick brown fox jumped over the lazy dog. This is an example of a pangram - a sentence that contains every letter of the alphabet at least once. A self-enumerating pangram is a ...
5
votes
5answers
382 views

M_ss_ng Lette_s

Given this list of all the words in english and a string with s_me missi_g lett__s, find one way to fill in the letters. Do note that some words on the list contain special characters (...
17
votes
23answers
2k views

Sort spelled-out serial numbers

Given a list of two or more spelled-out serial numbers of equal length greater than two, e.g. ...
9
votes
5answers
475 views

Case-fold German

Given a German string and an indication of a case (lower/upper/title), fold the string to that case. Specifications Input will consist only of a–...
21
votes
25answers
3k views

Parse my Esperanto!

The famous constructed language Esperanto uses the Latin alphabet (mostly, see the linked wikipedia page for details). However, there are some characters with accents: ĉ, ĝ, ĥ, ĵ, ŝ, and ŭ. (C-...
25
votes
4answers
3k views

Ain't no thang! …or is it?

Introduction Street talk can be really difficult to understand, in particular to programmers, who aren't known to be very streetwise. It is your job to create an interpreter to help us all survive ...
8
votes
11answers
489 views

Stream of Letters to Words

Given a string containing only letters (case-insensitive), split it into words of uniformly random lengths, using the distribution below, with the exception of the last word, which can be of any valid ...
16
votes
4answers
1k views

Lorem Ipsum Generator [closed]

Lorem Ipsum is placeholder text used when preparing layout without wanted to have content already filled. One of its key features over using some arbitrary text is that it is nonsense. It isn't even ...
15
votes
18answers
3k views

Copodope Gopolopfop

The Language: Oppification A funny language to speak is created by applying the following process to each word: Place op after each consonant. So ...
7
votes
2answers
214 views

Check if a given string is valid romaji

Your program is given a string consisting entirely of lowercase letters at STDIN (or closest alternative). The program must then output a truthy or falsey value, depending on whether the input is ...
4
votes
1answer
232 views

Correct peoples grammar

(yes, that title was intentional) Your task is to correct common grammatical mistakes. You must: Capitalise the first letter of each sentence, ie the first non-whitespace letter after any of ...
37
votes
1answer
999 views

Guess how to pronounce German words

Introduction Unlike English, German is considered to have quite a phonemic writing system. That means that the correspondence between spelling and pronunciation is close. Given any word you aren't ...
25
votes
17answers
5k views

Convert singular to plural

There are two forms of nouns, singular and plural. The conversion between these two is quite easy. Normally, you end it with s. ex. ...
36
votes
18answers
5k views

Automate your first grade counting exercise

CodeGolf Challenge PWSSHHHH! You wake up in a cryogenics lab in the year 3000. Upon being escorted to the assignment office to receive your career chip, presumably that of a delivery boy, a probe ...
28
votes
1answer
411 views

Count spelling errors in text; minimize the number of spelling errors in your code

Write a program or function that takes two inputs: A text message The dictionary of English language, as it appears in this Github file (containing about 60000 words) and outputs the number of ...
10
votes
3answers
487 views

Find the shortest pangrams from a word list

A pangram is a string that contains every letter a-z of the English alphabet, case-insensitive. (It's OK if the pangram contains ...
5
votes
2answers
383 views

Why don't you grow up?

Why don't you grow up? In the past week a meme involving the young actor Aaron Bailey became trending in most Brazilian social networks. Entitled "why don't you grow up" it consists in repeating a ...
17
votes
19answers
3k views

An A , or An An?

In English, there is the fun and simple difference between an and a: you use an when ...
37
votes
15answers
5k views

How long is a Welsh word?

Write a program or function which receives as input a string representing a Welsh word (UTF-8 unless otherwise specified by you). The following are all single letters in Welsh: a, b, c, ch, d, dd, ...
16
votes
6answers
555 views

Golff y Côd - Treiglad

Read this yng Nghymraeg Challenge Given a word in Welsh, output all of the possible mutated forms of the word. Mutations A mutation is a change of the first letter of a word when following certain ...
10
votes
2answers
446 views

Conjugate a Turkish verb

Input verb, a string that matches the regular expression ([a-pr-vyzıöüçğş]*[aeıioöuü][bcçdfgğhj-nprsştvyz]+|([a-pr-vyzıöüçğş]*[aeıioöuü]){2})(mak|mek) plural, a ...
34
votes
16answers
5k views

Count to 100 in Danish

Print all the numbers from 0-100 in the right order using the Danish way of counting How they count Like English, they have dedicated words for 0-20, 30, 40 and 100 Instead of saying ...
32
votes
5answers
1k views

Patch the Paragraph

In the spirit of Patch the Image, here's a similar challenge but with text. Challenge Bit rot has afflicted your precious text! Given a paragraph composed of ASCII characters, with a rectangular ...
19
votes
11answers
2k views

What exactly was your question?

Introduction When you are given a boring text, you just want to get it over with as quick as possible. Let's observe the following text: ...
21
votes
7answers
1k views

I programming puzzles, il code golf

Background The Italian definite article (corresponding to English the) has seven different forms: l', il, lo, gli, i, la, le. Which one to use depends on three variables: Gender: masculine / ...
26
votes
34answers
5k views

What is the most frequent word?

What is the most frequent word? Given a sentence, your program must make its way through it, counting the frequencies of each word, then output the most used word. Because a sentence has no fixed ...
-4
votes
29answers
885 views

Convert phrases to reverse style [duplicate]

The Challenge Convert a phrase of two words to reverse style: candy bar -> bar le candy. Specifications There will be one word (only ...
8
votes
5answers
465 views

Word or near-word?

Write a program or function that given a string (or your language's equivalent), determine if the string is a word, or not, and output a truthy or falsy value. (This is not a duplicate of Is this ...
7
votes
1answer
452 views

Create a CleverBot

CleverBot is a conversational AI that works fundamentally by repeating responses from real humans it has heard previously. It starts off pretty dumb, but once the database becomes (a lot) larger it ...
13
votes
4answers
504 views

Conjugate in the Spanish imperfect / Conjugue en el imperfecto de indicativo

Given an input of a Spanish verb in its infinitive form, output the verb conjugated in all 6 forms of the indicative imperfect. To conjugate an infinitive in the imperfect, remove the infinitive ...
25
votes
3answers
1k views

¿xu ti te gismytermorna? (Is it a valid gismu?)

(Literally: "Does this follow/realize the gismu-form?") Premise The language Lojban is a constructed language, meaning in part that all of its words have been created rather than allowed to develop ...
38
votes
4answers
958 views

You're a Romanizer, Baby

Romanization of Japanese is converting Japanese text into Latin characters. In this challenge, you will be given a string of Japanese characters as input and expected to convert them to the correct ...
14
votes
17answers
935 views

Code Golf: Forwards sdrawkcaB sdrawkcaB Forwards Forwards sdrawkcaB

Task The user inputs a sentence - words only. Any input other than letters or spaces, including integers and punctuation, should throw an exception: "Sentence must only use letters". The output has a ...
21
votes
4answers
893 views

Telling time in French

Bonjour, PPCG ! Quelle heure est-il ? This means what time is it in French, for that is exactly what this challenge is about. Telling time in French (at least formally) is a bit different from ...
14
votes
5answers
345 views

Text Processing #1: Hyphenation

Background This is the first part of a 3-hole golf course on text processing. The over-arching idea is that if you take an input text and pipe it through the solutions to all three challenges (with a ...
17
votes
24answers
2k views

Sign that word 2!

Sign that word 2! Not that long ago, I posted a challenge called Sign that word!. In the challenge, you must find the signature of word, which is the letters put in order (e.g. The signature of ...
12
votes
43answers
5k views

Sign that word!

What is a Word Signature? The signature of a word are all of it's letters put in order - the signatures of this, hist and ...
21
votes
3answers
2k views

Distinguish between Masculine and Feminine Nouns in French within 100 characters

You are to write a very small program within 100 characters. Your program must distinguish between masculine and feminine french nouns. The output should be un if ...
13
votes
3answers
720 views

Decompose words into other words (e.g., “afterglow” = “aft” + “erg” + “low”)

Here's one for all you wordsmiths out there! Write a program or function which takes a list of words and produces a list of all possible concatenative decompositions for each word. For example: (Note:...
11
votes
2answers
665 views

Apply English punctuation rules

You've been hired to write some code for a dictation-taking app, which takes voice input from a spoken source, parses it as words, and writes it down on a screen. The management doesn't really trust ...
23
votes
5answers
4k views

Leet to English Translation

Your challenge is to write a program to translate (English) leetspeak/lolspeak/txtspk into normal English. Your program should read from standard input and output to standard output, unless your ...
9
votes
7answers
1k views

Program to Spoonerise words [duplicate]

A spoonerisation is swapping the first letter/pronounceable syllable of two or more words. Example: A lack of pies = A pack of lies. Bad salad = Sad ballad (ish) :) Challenge: Write a program to ...