Top "Code-golf" questions

Code Golf is a game that was played on Stack Overflow in its early days, but it is now considered off-topic.

Code Golf: Four is magic

The puzzle A little puzzle I heard while I was in high school went something like this... The questioner would …

language-agnostic code-golf rosetta-stone
Code Golf: Gray Code

The Challenge The shortest program by character count that outputs the n-bit Gray Code. n will be an arbitrary number …

algorithm code-golf gray-code
Code golf: combining multiple sorted lists into a single sorted list

Implement an algorithm to merge an arbitrary number of sorted lists into one sorted list. The aim is to create …

algorithm language-agnostic sorting merge code-golf
Code-golf: generate pascal's triangle

Generate a list of lists (or print, I don't mind) a Pascal's Triangle of size N with the least lines …

algorithm code-golf combinatorics discrete-mathematics pascals-triangle
Code Golf: Playing Tetris

The basics: Consider the following tetrominoes and empty playing field: 0123456789 I O Z T L S J [ ] [ ] # ## ## ### # ## # [ ] # ## ## # # ## # [ ] # ## ## [ ] # [ ] [==========] The dimensions of …

language-agnostic code-golf rosetta-stone
Creating the shortest Turing-complete interpreter

I've just tried to create the smallest possible language interpreter. Would you like to join and try? Rules of the …

computer-science code-golf turing-complete
Code Golf: Happy Primes!

It's Sunday, time for a round of code golf! Challenge Write the shortest source code by character count to determine …

language-agnostic code-golf rosetta-stone