Linked Questions

184 votes
379 answers
64k 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 ...
user avatar
  • 22.8k
168 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 ...
user avatar
117 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 ...
user avatar
90 votes
46 answers
27k 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 ...
user avatar
  • 1,683
49 votes
94 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 <...
user avatar
73 votes
44 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 ...
user avatar
41 votes
68 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 ...
user avatar
  • 11.1k
78 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 ...
user avatar
  • 3,711
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 ...
user avatar
  • 5,271
47 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 ...
user avatar
36 votes
34 answers
10k 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, ...
user avatar
  • 1,289
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 ...
user avatar
23 votes
12 answers
1k 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 ...
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 ...
user avatar
  • 917
34 votes
4 answers
4k views

The happy Ender problem

The happy ending problem (actually a theorem) states that Any set of five points in the plane in general position has a subset of four points that form the vertices of a convex quadrilateral. The ...
user avatar
  • 99.4k

15 30 50 per page