Linked Questions

13
votes
22answers
649 views

Output Rhombus Sequence without Nested Loops [duplicate]

The following is the rhombus sequence. 1 121 12321 1234321 123454321 12345654321 1234567654321 123456787654321 12345678987654321 Your task is to output this, ...
248
votes
143answers
79k views

Tips for golfing in Python

What general tips do you have for golfing in Python? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Python (e.g. "remove comments" is ...
65
votes
111answers
7k views

Print/Output the L-phabet

Inspired by George Gibson's Print a Tabula Recta. You are to print/output this exact text: ...
81
votes
35answers
8k views

Tips for golfing in <all languages>

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 ...
86
votes
38answers
20k views

Tips for golfing in Java

Are there any useful shortcuts that can be used in Java? As shown below, import already adds at least 17 characters to a program. ...
88
votes
37answers
11k views

Tips for Golfing in ECMAScript 6 and above

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 ...
24
votes
54answers
3k views

Alphabet triangle strikes again

Task Your task is to print this exact text: ...
31
votes
40answers
3k views

Alphabet Diamond

You've seen the amazing alphabet triangle, the revenge of the alphabet triangle and now it's time for the revenge of the revenge of the alphabet triangle! Introducing... THE ALPHABET DIAMOND! Your ...
25
votes
48answers
2k views

Confusing Alphabet Staircase

Given no input, output this interesting alphabet pattern in either case (the case has to be consistent) via an accepted output method: A AB ACBC ADBDCD AEBECEDE AFBFCFDFEF AGBGCGDGEGFG AHBHCHDHEHFHGH ...
23
votes
28answers
3k views

Creating a Crossed Square

Creating a Crossed Square You are to take input of an integer of one or more and output a square made of any printable character of your choice with a diagonal cross through the centre. The general ...
22
votes
16answers
3k views

Print 1 to 15, using different printers

Making a versatile integer printer is nice and all, but writing a single code that prints a lot of different numbers is cumbersome. Wouldn't it be easier to make a script that outputs a number, but ...
7
votes
11answers
1k views

Wait, but what's e^N?

Objective: The objective is to calculate e^N for some real or imaginary N (e.g. 2, -3i, 0.7, 2.5i, but not 3+2i). This is code golf, so, shortest code (in bytes) wins. So, for example: N = 3, e^N =...
18
votes
4answers
543 views

I've been alphabet hunting for a while

Y'know, we've had a lot of "alphabet" challenges recently. (one two three four five.) While I love a good challenge, and those challenges were very fun, I think it's time for a change of pace. We need ...
9
votes
5answers
676 views

Tips for golfing in Lisp

What general tips are these for golfing in Lisp (any dialect)? Please post one tip per answer, and only answers that are specific to a dialect of Lisp (e.g. "remove comments" is not an answer). ...