Linked Questions

86
votes
268answers
17k views

Simple cat program

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 named after ...
30
votes
29answers
5k views

How far should I sum?

How far should I sum? The harmonic series is the "infinite sum" of all the fractions of the form \$\frac1n\$ for \$n\$ positive integer. I.e. the harmonic series is $$\frac11 + \frac12 + \frac13 + \...
12
votes
5answers
283 views

Composition of permutations – the group product

Given two permutations in disjoint cycle form, output their product/composition in disjoint cycle form. To find the composition, convert the disjoint cycles to permutations in two-line notation. Each ...
373
votes
38answers
53k views

Covfefify a string

In this challenge, you must take a string matching the regex ^[a-zA-Z]+$ or whatever is reasonable (you don't have to consider uppercase or lowercase letters if you ...
10
votes
34answers
2k views

Find the number of integers in the range from 1 to N that ends with 2

Task As input you have: a positive integer N And you should output: The number of integers in \$[1,N]\$ (an inclusive range) which end with the digit \$2\$ in ...
25
votes
13answers
4k views

This highway needs rain across both of its lanes

In this challenge you will take a an ascii art image of a highway like so ...
21
votes
15answers
2k views

Connect Four Validator

Introduction Connect Four is a game where you attempt to get four in a row: horizontally, vertically, or diagonally. In this code golf, we will be trying to find who won, given a game board. There ...
124
votes
275answers
26k views

Shortest code to produce infinite output

Write the shortest code you can that produces an infinite output. That's all. You code will only be disqualified if it stops producing output at some point. As always in code golf, the shortest code ...
86
votes
104answers
11k views

N(e(s(t))) a string

To "function nest" a string, you must: Treat the first character as a function, and the following characters as the arguments to that function. For example, if the input string was ...
15
votes
23answers
2k views

Summing a sub-square of a quarter of an infinite chessboard

Description of the problem Imagine a quarter of an infinite chessboard, as in a square grid, extending up and right, so that you can see the lower left corner. Place a 0 in there. Now for every other ...
82
votes
35answers
9k 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 ...
54
votes
50answers
7k views

Convert YYYYMM to MMMYY

Basing on this SO question. Challenge is rather simple: given a date period in the format YYYYMM output it in the format MMMYY. ...
87
votes
79answers
22k views

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Hold up..... this isn't trolling. Background These days on YouTube, comment sections are littered with such patterns: ...
38
votes
96answers
14k 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 ...
58
votes
52answers
10k views

How much code would a codegolf golf if a codegolf could golf code?

Write a function or program that takes two words as input and outputs variants of the popular English tongue-twister "How much wood would a woodchuck chuck if a woodchuck could chuck wood?". The ...

15 30 50 per page
1
2 3 4 5
16