Linked Questions

68 votes
235 answers

Add two numbers

Input: Two integers. Preferably decimal integers, but other forms of numbers can be used. These can be given to the code in standard input, as arguments to the program or function, or as a list. ...
anna328p's user avatar
  • 6,396
76 votes
59 answers

Tips for code-golfing in C#

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 ...
jcolebrand's user avatar
  • 1,883
52 votes
35 answers

Tips for golfing in x86/x64 machine code

I noticed that there's no such question, so here it is: Do you have general tips for golfing in x86/x64 machine code? If the tip only applies to a certain environment or calling convention, please ...
ბიმო's user avatar
  • 16.8k
42 votes
18 answers

Tips for golfing in GolfScript

What, this post doesn't exist yet? Of course, GolfScript is made for golfing, so you might think that no specific tips are really needed. But to make full use of GolfScript's features, you need to ...
Ilmari Karonen's user avatar
19 votes
47 answers

Implement String Projection

Given two strings: a string s and an alphabet a, implement string projection in the shortest code possible. String projection ...
bigyihsuan's user avatar
  • 9,766
16 votes
37 answers

Special String reformatting

This challenge is to take an alphabetical string as input and to apply the following conversion: The first of each type of character of the string must stay, and must be immediately followed by an ...
Daniel H.'s user avatar
  • 3,428
10 votes
32 answers

Remove repeated words from a string

Remove all repeating words from an inputted sentence. Input will be something like cat dog cat dog bird dog Snake snake Snake and the output should be ...
Alien G's user avatar
  • 437
15 votes
25 answers

Making Sandwiches

Introduction Bob runs a deli. His deli serves sandwiches to its customers. However, it is a bit unusual. At Bob's deli, instead of telling Bob what they want, customers show Bob an ASCII art drawing ...
sugarfi's user avatar
  • 2,203
14 votes
26 answers

Filter an array so that duplicate items are removed

In the shortest amount of code in any programming language, filter out the duplicate items in an array of which the order is irrelevant. Here are some test cases: ...
Richie Bendall's user avatar
3 votes
12 answers

How's your string theory? [closed]

Back to the basics! You're in you comp sci class again, except wiser and golfier. You have the tools, you have the power… but do you have the skill? Probably. Crash Course for the non-Computer ...
Conor O'Brien's user avatar