Linked Questions

178 votes
509 answers
40k views

A truth-machine (credits goes to this guy for coming up with it) is a very simple program designed to demonstrate the I/O and control flow of a language. Here's what a truth-machine does: Gets a ...
a spaghetto's user avatar
  • 11.3k
203 votes
439 answers
84k views

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.6k
114 votes
341 answers
25k views

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 ...
Martin Ender's user avatar
76 votes
180 answers
19k views

Print integers 0 to 100 (inclusive) without using characters 123456789 in your code. Separator of numbers can be comma or white space (by default <blank>, <...
user avatar
168 votes
65 answers
44k views

What general tips do you have for golfing in C? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to C (e.g. "remove comments" is not an ...
Casey's user avatar
  • 3,629
89 votes
98 answers
21k views

The challenge: Define x in such a way that the expression (x == x+2) would evaluate to true. I tagged the question with C, but ...
81 votes
129 answers
11k views

Inspired by a bug in a solution to this challenge, your challenge is to produce this exact text: ...
MD XF's user avatar
  • 14.3k
78 votes
96 answers
18k views

Challenge I need help building a brick wall! Throw together some code for me using no input and produce the following output wall shown below: ...
Dylan's user avatar
  • 965
105 votes
45 answers
14k views

The aim of this post is to gather all the golfing tips that can be easily applied to <all languages> rather than a specific one. Only post answers that its ...
ajax333221's user avatar
  • 3,694
64 votes
91 answers
14k views

Introduction The game Minecraft has a 1 in 10000 chance of showing "Minceraft" instead of "Minecraft" on the title screen. Your challenge Your challenge is to code a function or ...
emanresu A's user avatar
  • 46.2k
110 votes
44 answers
19k views

This is similar to other "Tips for golfing in <...>" but specifically targeting the newer features in JavaScript brought up in ECMAScript 6 and above. JavaScript inherently is a very verbose ...
Optimizer's user avatar
  • 26.6k
102 votes
51 answers
9k views

Assume we want to shift an array like it is done in the 2048 game: if we have two equal consecutive elements in array, merge them into twice the value element. Shift must return a new array, where ...
greenwolf's user avatar
  • 1,061
54 votes
76 answers
19k views

Make a program that takes the word you input, and adds that word to the back of itself minus its first letter, then repeats until all letters are gone. For example, ...
qazwsx's user avatar
  • 1,194
47 votes
95 answers
11k views

Binary to decimal converter As far as I can see, we don't have a simple binary to decimal conversion challenge. Write a program or function that takes a positive binary integer and outputs its ...
Stewie Griffin's user avatar
60 votes
61 answers
7k views

Background When I was in elementary school, we used to play a game in math class that goes as follows. All kids sit in a big circle and take turns counting, starting from 1. However, the following ...
Dennis's user avatar
  • 212k

15 30 50 per page
1
2 3 4 5 6