Linked Questions

193 votes
412 answers
73k views

1, 2, Fizz, 4, Buzz

Introduction In our recent effort to collect catalogues of shortest solutions for standard programming exercises, here is PPCG's first ever vanilla FizzBuzz challenge. If you wish to see other ...
Beta Decay's user avatar
  • 23.2k
167 votes
70 answers
24k views

How high can you count?

Challenge: Your task is to write as many programs / functions / snippets as you can, where each one outputs / prints / returns an integer. The first program must output the integer ...
Stewie Griffin's user avatar
118 votes
62 answers
27k views

GO OUT AND VOTE

Today is November 8th, 2016, Election Day in the United States of America. If you are a U.S. citizen eligible to vote, then go out and vote if you haven't already before answering this challenge. Do ...
Calvin's Hobbies's user avatar
55 votes
105 answers
6k views

StringgnirtSStringgnirtSStringgnirtS

Here is a relatively simple challenge for you. Given a string of length N, output the string forwards, then backwards, then forwards, then backwards... etc. N times. For example, if your input was <...
DJMcMayhem's user avatar
  • 58.8k
91 votes
45 answers
28k views

Fifty Shades of Grey

Boys and girls are excited to see Fifty Shades of Grey on the silver screen, we just want to code without being bothered, so here's a challenge to pick our brain. You have to: Print on the screen ...
jsedano's user avatar
  • 1,713
46 votes
76 answers
7k views

Pointlessly make your way down the alphabet

Disclaimer: This challenge inspired by me spending the morning debugging recursive functions, which have been frying my brain a little. Here's an example of recursion, from a letter, we keep going to ...
AJFaraday's user avatar
  • 11.7k
74 votes
45 answers
8k views

Happy Birthday V!

Thanks to @KritixiLithos for helping me out with this challenge! V is a programming language that I wrote so that I could use and extend vim for code-golf challenges. The very first commit was on ...
DJMcMayhem's user avatar
  • 58.8k
79 votes
30 answers
13k views

418: I'm a teapot

As we all should know, there's a HTTP status code 418: I'm a teapot. Your mission, should you choose to accept it, is to use your creativitea and write the smallest possible server that responds with ...
Etheryte's user avatar
  • 3,798
34 votes
48 answers
9k views

Tell me my screen resolution!

Output the device's screen resolution in the specific format of [width]x[height](without the brackets). For example, an output could be ...
Matthew Roh's user avatar
  • 5,353
48 votes
40 answers
10k views

Weapons of Math Instruction

Last time when I tried to come up with something easy that wasn't a duplicate, it ended up being way too hard.. So hopefully this time it's indeed something newcomers can try as well. Input: An ...
Kevin Cruijssen's user avatar
36 votes
34 answers
11k views

Press any key to continue

Your task is to create a program that will display the following text, wait for the user to press a key (it is okay to ignore keys like ctrl, ...
ckjbgames's user avatar
  • 1,309
39 votes
23 answers
2k views

Lined up circle, n points

Draw lines between every pair of distinct points for n points arranged in a circle, producing something like the below result. Shortest code (in bytes) wins! Your ...
Alecto Irene Perez's user avatar
26 votes
14 answers
3k views

Print every Fool's Mate

In chess, the Fool's Mate is the fastest possible way to reach checkmate. It is reached with Black's second move. In chess notation, one possible sequence of moves that achieves Fool's Mate is ...
Pandu's user avatar
  • 722
23 votes
12 answers
2k views

Tips for golfing in MATL

MATL is a golfing language created by Luis Mendo. MATL has proven to be highly competitive, often beating submissions in other golfing languages such as Pyth, CJam and Jelly. What are some useful ...
Stewie Griffin's user avatar
18 votes
11 answers
1k views

Tips for golfing in Octave

What general tips do you have for golfing in Octave? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Octave (e.g. "remove comments" is ...
RAM's user avatar
  • 937

15 30 50 per page