Linked Questions

520 votes
983 answers
193k views

"Hello, World!"

So... uh... this is a bit embarrassing. But we don't have a plain "Hello, World!" challenge yet (despite having 35 variants tagged with hello-world, and counting). While this is not the most ...
Martin Ender's user avatar
235 votes
369 answers
65k views

Is this number a prime?

Believe it or not, we do not yet have a code golf challenge for a simple primality test. While it may not be the most interesting challenge, particularly for "usual" languages, it can be nontrivial in ...
Dennis's user avatar
  • 210k
112 votes
330 answers
22k views

Simple cat program

One of the most common standard tasks (especially when showcasing esoteric programming languages) is to implement a "cat program": read all of STDIN and print it to STDOUT. While this is named after ...
Martin Ender's user avatar
93 votes
247 answers
20k views

"DDoouubbllee ssppeeaakk!!"

Super simple challenge today, or is it? I feel like we've heard a fair bit about double speak recently, well let's define it in a codable way... Double speak is when each and every character in a ...
AJFaraday's user avatar
  • 11.8k
79 votes
261 answers
25k views

Is this even or odd?

Note: There is not been a vanilla parity test challenge yet (There is a C/C++ one but that disallows the ability to use languages other than C/C++, and other non-vanilla ones are mostly closed too), ...
Matthew Roh's user avatar
  • 5,347
64 votes
153 answers
13k views

Draw an asterisk triangle

Inspired by a task for Programming 101, here's a challenge that hopefully isn't too easy (or a duplicate). Input: A positive integer n >= 1. Output: ...
Sickboy's user avatar
  • 1,205
74 votes
141 answers
11k views

Make a ;# interpreter

I recently created a new language called ;# (pronounced "Semicolon Hash") which only has two commands: ; add one to ...
caird coinheringaahin g's user avatar
55 votes
102 answers
11k views

Is it double speak?

In an earlier challenge I asked code golfers to produce strings which copy each character in a string. For example: TThhiiss iiss ddoouubbllee ssppeeaakk!! This ...
AJFaraday's user avatar
  • 11.8k
67 votes
65 answers
9k views

Convert YYYYMM to MMMYY

Basing on this SO question. Challenge is rather simple: given a date period in the format YYYYMM output it in the format MMMYY. ...
pajonk's user avatar
  • 16.3k
78 votes
43 answers
7k views

Stack Exchange Vote Simulator

Write a program or function that takes in a string only containing the characters ^ and v (you can assume there will be no other ...
Calvin's Hobbies's user avatar
36 votes
49 answers
4k views

Least Common Multiple

The least common multiple of a set of positive integers A is the smallest postive integer B such that, for each ...
user avatar
34 votes
49 answers
5k views

Generate Recamán's sequence

Recamán's sequence (A005132) is a mathematical sequence, defined as such: A(0) = 0 A(n) = A(n-1) - n if A(n-1) - n > 0 and is new, else A(n) = A(n-1) + n A ...
James Williams's user avatar
28 votes
30 answers
3k views

Find the first word starting with each letter

Given a string, find the first word starting with each letter (case insensitive). Sample Using Ferulas flourish in gorgeous gardens. as input: ...
removed's user avatar
  • 2,803
27 votes
21 answers
5k views

It almost works (Cops' Thread)

Robbers' Thread Your challenge is to find an existing challenge, and implement it in a way such that certain inputs fail. At least one input must not produce the correct output (use the other ...
emanresu A's user avatar
  • 38.4k