# All Questions

11,163 questions
Filter by
Sorted by
Tagged with
61 views

### Jury-rigged Netcat from default Windows [closed]

Something unusual: a code golf question with a purpose. I occasionally find myself in scenarios resembling the following: Suppose you have two computers, A and B. Both of them have a fresh copy of ...
232 views

### WTF.js Obfuscator

Background One of the commonly meme'd aspects of javascript is its incredibly loose type coercion that allows for +!![]+[+[]] == '10' this technique can also be ...
740 views

### Tips for Creating/Maintaining a Golfing Language

Creating a golfing language can be hard. Let's help budding golfing language creators out and provide some helpful tips on how to create one. I'm looking for tips on: The design process ...
2k views

### Shift right by half a bit

The challenge is to implement a program or function (subsequently referred to as "program") that takes a nonnegative integer $n$ as input and returns $n\over\sqrt{2}$ (the input divided by the ...
214 views

### How predictable is popular music?

The McGill Billboard Project annotates various audio features of songs from a random sample of the Billboard charts. I scraped this data to produce the following file of chord progressions: ...
757 views

### Bucket and Minimize

The challenge - given a numeric list L and an integer N as inputs, write a function that: finds the bucket sizes for L such that it is split into N whole buckets of equal or near-equal size, and ...
2k views

### Make The Finest Magic Code Square

In math a magic square is an N×N grid of numbers from 1 to N2 such that every row, column, and diagonal sums to the same total. For example here's a 3×3 magic square: In this challenge we'...
5k views

### Internal Truth Machine

It's a normal truth machine but instead of taking input, it uses the first character of the program. Thus, internal. The 0 and 1 are plain characters, i.e. ASCII code 0x30 and 0x31 respectively. ...
60 views

### Selfish Programs [duplicate]

The Challenge Write two programs P and Q such that: P and ...
52 views

### What is the shortest brainfuck quine? [duplicate]

(Apart from the empty program of course) The shortest I could find was this 410 byte beauty: ...
7k views

### What's my telephone number?

Introduction The telephone numbers or involution numbers are a sequence of integers that count the ways $n$ telephone lines can be connected to each other, where each line can be connected to at ...
130 views

Interpret language X in language X with as little code as possible. Your implementation of language X must be able to interpret on your implementation of language X, and your implementation of ...
324 views

### Is everything in order?

Challenge: Input: a string, consisting of only printable ASCII characters Output: a truthy/falsey value whether its characters are in alphabetical order (based on their UTF-8 unicode values), from ...
105 views

### Abuse Python's Classes [closed]

Just make the best Python program you can that totally abuses OOP. It can do anything, but not nothing. Hint word for something interesting: pseudostatic
406 views

In this fastest-code challenge, you are provided with a set of $n$ identical blocks and need to determine how many unique buildings can be constructed with them. Buildings must satisfy the following ...
226 views

### Cutting Sequence for N dimensions

Inputs: The program or function should take 2 vector-like (e.g. a list of numbers) O and V of the same number of dimensions, and a number T (all floating-point numbers or similar) Constraints: T >=...
3k views

### Smallest number such that concatenation is a square

Challenge Write a program or function that takes a number $n$ and returns the smallest $k$ such that concatenation $n'k$ is a square. This sequence is described by A071176 on the OEIS. I/O ...
62 views

### Time complexity of combinations of n pairs of parentheses [closed]

I have the following code snippet for combinations of n pairs of parentheses. ...
1k views

### Are the beams above or below the notes?

In musical notation, groups of notes shorter than one beat are joined together by a line at the bottom called a beam. Here are a few bars of music with the beams highlighted: (Taken from Second Suite ...
2k views

### Move my liquid to make me equal

You are given 4 positive integers: volume of the first container (v1), volume of the second container (v2), volume of the liquid ...
708 views

### Spotify Shuffle (music playlist shuffle algorithm)

Background Perfect shuffle algorithms like Fisher-Yates shuffle don't produce great results when it comes to music playlist shuffling, because it often produces clusters of songs from the same album. ...
511 views

### Keta Bracket Autocompletion

Special thanks to Bubbler and AdmBorkBork for supplying feedback about this challenge Keta (Keyboard tacit — clever naming, I know!) is a golfing language I’ve been working on recently. One of it’s ...
69 views

write a program that loads 10 values from a file and computes the average. you should only open the file once. C++
7k views

### 99 ways to say “I love you”

Inspired by this blog post. Write a program that outputs 99 distinct programs (in the same language) that output the string I love you. How the programs are ...
423 views

### Average number of strings with Levenshtein distance up to 4

This is a version of this question which should not have such a straightforward solution and so should be more of an interesting coding challenge. It seems, for example, very likely there is no easy ...
367 views

481 views

### When is Hannukah?

Input The input will be a year between 1583 and 2239. We just want to know when Hannukah was or will be in that year. This is information used by millions of people every year and put in calendars ...
3k views

### Generate a Nine-Ball Pool rack

Introduction Nine-Ball is a popular pool game played casually and as a competitive sport. There is one of each numbered ball, with the numbers 1 to 9. The game starts with all 9 of the balls in a ...
182 views

### Partial tq interpreter

In this task you are expected to provide a list output given an input tq program. The tq programs will not contain whitespace inside them. What is tq, in the first place? tq is a lazy-evaluated ...
398 views

### Partitioning Digits into Distinct Integers

Given a sequence of base-10 digits, output the longest list of integers that contains all the digits exactly once, in the order in which they appeared in the input, without repeating any integers. ...
372 views

### Integer Keys and Duplicates

Given a non-empty list/vector of positive integers, write a function to check the following conditions in as few bytes as possible. Take the first integer (the key, or k1) and check that the next k1 ...
369 views