Questions tagged [decision-problem]
For challenges which involve deciding whether or not the input meets certain criteria, and outputting some data, representing that decision.
760
questions
5
votes
3
answers
117
views
Double dequer sort
In this challenge Bubbler describes sorting a list by inserting its elements left to right into a double ended queue or "deque".
Take a number from the front of the array, and push it into ...
3
votes
18
answers
324
views
Check if two lists are permutations of each other [duplicate]
Challenge
Given two lists of equal length, find if one of them is a permutation of the other. Output truthy or falsy values, or 1 or 0.
Test case Examples
...
18
votes
21
answers
5k
views
Wait, ASCII was 128 characters all along?
Challenge
In this challenge, you have to take a nonnegative integer as input, convert it into base-128 bytes (0 → 0x00, 127 → ...
20
votes
15
answers
2k
views
Sorting with a deque
You're given an array of positive integers. Your job is to sort them using an initially empty deque (double-ended queue) by the following procedure:
Take a number from the front of the array, and ...
9
votes
13
answers
1k
views
Is it an option for the ls utility specified in POSIX.1-2017?
The ls utility lists specified directory content. It is infamous for stupidly lots of options which is known for anti-pattern design of implementing software.(...
11
votes
15
answers
2k
views
Is this a Hadamard matrix?
Hadamard matrices is a square matrix whose entries are either +1 or −1 and whose rows are mutually orthogonal.
In other words, it means that each pair of rows has matching entries in exactly half of ...
3
votes
1
answer
127
views
Detect revokes in Jass
Jass is a trick-taking game for four players and the national card game of Switzerland. It is played with a 36-card deck, four suits each with ranks 6, 7, 8, 9, 10, J, Q, K, A. We will be using French ...
20
votes
23
answers
1k
views
Is this a valid PZN?
Is this a valid PZN?
A Pharmazentralnummer, or PZN, is an eight-digit code which uniquely identifies medications, medical products, and similar items in the German healthcare system. Examples include ...
15
votes
5
answers
1k
views
Is this a solvable Numberlink?
Challenge
Per Wikipedia:
Numberlink is a type of logic puzzle involving finding paths to
connect numbers in a grid.
The player has to pair up all the matching numbers on the grid with
single ...
26
votes
14
answers
2k
views
Is it a cartesian product?
The cartesian product of two multisets \$A\$ and \$B\$ is the multiset of all ordered pairs consisting of an element of \$A\$ and an element of \$B\$. For example, the cartesian product of \$\{1, 2, 7,...
5
votes
1
answer
307
views
Dishonest dungeon staff
This is a joint post with https://puzzling.stackexchange.com/questions/126255/dishonest-dungeon-staff
You are faced with the difficult task to set up a dungeon for adventurers. However you made a deal ...
29
votes
5
answers
2k
views
Can I Clear The Grid?
I recently found this game and have been enjoying it. Basically, there is a grid of colored tiles and you act by clicking on empty spaces. When you click an empty space, the first tile (if any) in ...
10
votes
5
answers
975
views
Manipulate integers to zero
Objective
Given a nonempty unordered list of positive integers, decide whether they can be added, negated, or multiplied to yield a single zero. Each given number must be used exactly once.
There is a ...
21
votes
15
answers
2k
views
Can I follow this recipe?
You work in a kitchen which has a peculiar rule. When you mix something into a pot you must always add at least one new ingredient.
So you can add pasta, oil, salt then pesto, but not pasta, pesto, ...
18
votes
26
answers
2k
views
Is it a tetrate of two?
The tetration operation consists of repeated exponentiation, and it is written ↑↑. For instance,
3↑↑3 =3 ^(3^3) = 3^27 = 7,625,597,484,987
A tetrate of two is an ...