Skip to main content

All Questions

3 votes
18 answers
305 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 ...
Andy Liu's user avatar
  • 121
18 votes
19 answers
4k 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 → ...
squareroot12621's user avatar
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 ...
Bubbler's user avatar
  • 77.5k
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.(...
鳴神裁四点一号's user avatar
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 ...
Fmbalbuena's user avatar
  • 4,167
3 votes
1 answer
125 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 ...
Parcly Taxel's user avatar
  • 3,845
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 ...
Ciaran_McCarthy's user avatar
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 ...
badatgolf's user avatar
  • 1,477
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,...
emanresu A's user avatar
  • 39.2k
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 ...
hyper-neutrino's user avatar
  • 42.5k
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 ...
Dannyu NDos's user avatar
  • 5,961
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, ...
Wheat Wizard's user avatar
  • 99k
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 ...
isaacg's user avatar
  • 42.1k
10 votes
5 answers
555 views

Is the king in check?

Challenge: Given a 2D array (8x8) of characters, is the enemy king in check? The program should return true if and only if the king is currently in check. Standard chess rules apply. Specifications: ...
Mickey's user avatar
  • 111
18 votes
12 answers
2k views

Is it a valid ARM immediate value?

Exposition In this challenge, I am talking about ARM assembly language. ARM is a 32-bit RISC processor; I'll use instruction set up to architecture v6. To load a constant ("immediate") value ...
anatolyg's user avatar
  • 13.7k

15 30 50 per page
1
2 3 4 5
50