Tagged Questions
17
votes
2answers
961 views
Mastermind strategy
I could only find code-golf challenges for Mastermind, so here's a code-challenge version that I would have liked to take on myself.
An optimal strategy for the normal Mastermind game, MM(4,6), was ...
11
votes
2answers
493 views
Travelling Salesman
Your are given, as a list or vector or whatever, a bunch of 3-tuples or whatever, where the first two things are strings, and the third thing is a number. The strings are cities, and the number is ...
7
votes
4answers
417 views
Build a drug testing scheduler
In this problem on Puzzling.SE, I ask a question about determining the amounts of drug to use in a clinical test to minimize total drug usage and fulfill the requirements of the testing procedure.
...
4
votes
0answers
98 views
Using dictionaries, thesauruses, and similar databases, construct as large of a “See also” loop as possible [closed]
As I'm sure many of you know, synonyms can range from very similar to not-so-similar-but-I-can-see-how-it's-similar. It's common for dictionaries to use "See also" to denote occurrences of words that ...
37
votes
1answer
975 views
Minimal keystrokes needed to type a given text
We all know that programmers tend to be lazy. In order to maximize your free time, you decide to write a program that outputs a minimal number of keystrokes for text fed into it.
Input: Text that ...
3
votes
2answers
289 views
Build a program that creates a minimal one-ohm resistor diagram for a given resistance
You are a contractor for a company who designs electrical circuits for the various products they make. One day, the company accidentally gets a huge shipment of one-ohm resistors and absolutely ...
10
votes
2answers
693 views
Implement superoptimizer for addition
The task is to write code that can find small logical formulae for sums of bits.
The overall challenge is for your code to find the smallest possible propositional logical formula to check if the sum ...
6
votes
3answers
565 views
Who brings the croissants?
This question is inspired by a similar question first asked on StackOverflow by Florian Margaine, then asked in variant forms on CS by Gilles and on Programmers by GlenH7.
This time, it's a code ...
12
votes
2answers
606 views
Compact a Befunge program
Befunge is a 2-dimensional esoteric programming language. The basic idea is that (one-character) commands are placed on a 2-dimensional grid. Control flow walks across the grid, executing commands it ...
9
votes
4answers
816 views
Program my microwave oven
I'm very lazy so I try to always program my microwave with the fewest possible button presses. My microwave has the following buttons:
A "minute plus" button which may only be pressed first and ...
2
votes
3answers
1k views
Fastest python implementation of multiplication table
I'd be interested to see who can come up with the fastest function to produce multiplication tables, in the following format:
1 2 3 4 5 6 7 8 9 10 11 12
2 4 6 8 10 12 ...