You are using an outdated browser. Please update your browser for a better user experience.

Apocalyptic Numbers

logic


A number n is "apocalyptic" if the result of 2^n contains a string of 3 consecutive 6s
(666 being the presumptive "number of the beast").

Create a function that takes a number n as input.
If the number is apocalyptic, find the start index of the first/leftmost 666 sequence in 2^n...

Coin Logic Problem

logic

How to arrange the coins into two groups, each with the same number of heads and tails?
... There are ten coins in front of you. You are blind folded. You can flip each coin any number of times but there is no way to tell if a coin is a heads or tails. Coins start with 5 heads and 5 tails....

Hourglass Time Counting

logic

9 Minutes Problem ...

Hints

  1. If you are very stuck, make a list of possible cases of each state

... Solution:

  1. Flip both the 4 and the 7
  2. After 4 min (the 4 is finished and 7 has 3 min left) flip the 4 (now 4 has 4 min left and 7 has 3 min left)
  3. After 3 more min (7 total) the 7 has...

How to get 24

logic

How can you get the number 24 by only using the numbers 8, 8, 3 and 3?

Rules: You can use add, subtract, multiply, divide, and parentheses.

Bonus Rules: you are also allowed to use logarithms, factorials, and roots ...

Solution 1.

8/(3-(8/3))

= 8/(1/3)

= 24

Solution 2.

((...

Math & Logic - Dominos

logic

Dominos: fit ...

There is an 8x8 chessboard in which two diagonally opposite corners have been cut off. You are given 31 dominos, and a single domino covers exactly two squares.


Can you use all 31 dominos to cover the entire board? Prove your answer (by providing an example or showing why it's i

...

N Queens (Challenge)

logic

Given an int N, the length of a square chess board, return a boolean telling if it is possible to arrange N queens on the board without any being able to attack each other. If true, print the board using a given function printBoard(int[][] A). Boolean solveBoard(int N)



Hints

  1. How can a co...

Poisoned Soda Problem (Optimization Problem)

logic

You have 1000 bottles of soda, and exactly one is poisoned. You have 10 test strips, which can be used to detect poison. A single of posion will turn the test strip positive permanently. You can put any number of drops on a test strip at once and you can reuse a test strip as many times as you'd...