Linked Questions

73
votes
236answers
23k views

Is this even or odd?

Note: There is not been a vanilla parity test challenge yet (There is a C/C++ one but that disallows the ability to use languages other than C/C++, and other non-vanilla ones are mostly closed too), ...
153
votes
88answers
53k views

Tips for golfing in JavaScript

What general tips do you have for golfing in JavaScript? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to JavaScript (e.g. "remove ...
80
votes
189answers
18k views

Find the Factorial!

Create the shortest program or function that finds the factorial of a non-negative integer. The factorial, represented with ! is defined as such $$n!:=\begin{...
84
votes
161answers
19k views

“99 Bottles of Beer”

Write a program that outputs the lyrics to 99 Bottles of Beer, in as few bytes as possible. Lyrics: ...
72
votes
172answers
14k views

Sum of all integers from 1 to n

I'm honestly surprised that this hasn't been done already. If you can find an existing thread, by all means mark this as a duplicate or let me know. Input Your input is in the form of any positive ...
86
votes
138answers
12k views

Determine whether strings are anagrams

Challenge Given two strings, work out if they both have exactly the same characters in them. Example Input word, wrdo This returns true because they are the ...
71
votes
148answers
17k views

The alphabet in programming languages

Our task is to, for each letter of the (English) alphabet, write a program that prints the alphabet, in a language whose name starts with that letter. Input: none Output: ...
62
votes
149answers
12k views

Draw an asterisk triangle

Inspired by a task for programming 101 here's a task that hopefully isn't too easy or is a duplicate (kinda hard to search for things like this). Input: A positive integer ...
68
votes
120answers
8k views

Print/Output the L-phabet

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

Reverse stdin and place on stdout

Requirements: Take an input on stdin including new lines / carriage returns of unlimited length (only bounded by system memory; that is, there is no inherent limit in the program.) Output the reverse ...
47
votes
142answers
9k views

Stay away from zero

Task Given a non-negative integer n, output 1 if n is 0,...
44
votes
137answers
6k views

Full Width Text

Full width text is text that has a space after every character, including the last one. For instance, the first sentence of this question becomes: ...
43
votes
107answers
16k views

Is this number evil?

Introduction In number theory, a number is considered evil if there are an even number of 1's in its binary representation. In today's challenge, you will be identifying whether or not a given number ...
51
votes
75answers
7k views

Output Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo

Challenge The goal is to output Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo. Context. (Maybe another interesting challenge could be printing all ...
34
votes
100answers
10k views

Print 0 to 100 without 1-9 characters

Print 0 to 100 without using characters 1,2,3,4,5,6,7,8,9 in your code. Seperator of numbers can be comma, whitespace or newline. Shortest code wins.

15 30 50 per page
1
2 3 4 5 6