Linked Questions

151
votes
267answers
41k 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 ...
157
votes
63answers
22k 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 ...
114
votes
55answers
26k 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 ...
92
votes
45answers
26k 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 ...
44
votes
88answers
5k 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 <...
72
votes
40answers
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 ...
68
votes
27answers
12k 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 ...
34
votes
55answers
6k 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 ...
33
votes
46answers
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 ...
44
votes
38answers
9k 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 ...
36
votes
34answers
7k 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, ...
39
votes
23answers
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 ...
20
votes
12answers
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 ...
18
votes
10answers
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 ...
33
votes
4answers
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 ...

15 30 50 per page