Skip to main content
added 20 characters in body
Source Link
Jamal Senjaya
  • 18k
  • 2
  • 42
  • 148

If We do not know which coin is a dime, a nickel or a quarter.

We can do permutation algorithm to reveal all possibilities
By flipping 1 coin each time
So there are at most 4 flips

Worst Case example : 

H H T
H T T
H T H
T T H
T T T

But If the question is to make all heads, so there are at most 7 flips

Hthere are at most 7 flips
H H T
H T T
H T H
T T H
T T T
T H T
T H H
H H H

If We do not know which coin is a dime, a nickel or a quarter.

We can do permutation algorithm to reveal all possibilities
By flipping 1 coin each time
So there are at most 4 flips

example :

H H T
H T T
H T H
T T H
T T T

But If the question is to make all heads, so there are at most 7 flips

H H T
H T T
H T H
T T H
T T T
T H T
T H H
H H H

If We do not know which coin is a dime, a nickel or a quarter.

We can do permutation algorithm to reveal all possibilities
By flipping 1 coin each time
So there are at most 4 flips

Worst Case example : 

H H T
H T T
H T H
T T H
T T T

But If the question is to make all heads,

there are at most 7 flips
H H T
H T T
H T H
T T H
T T T
T H T
T H H
H H H

Source Link
Jamal Senjaya
  • 18k
  • 2
  • 42
  • 148

If We do not know which coin is a dime, a nickel or a quarter.

We can do permutation algorithm to reveal all possibilities
By flipping 1 coin each time
So there are at most 4 flips

example :

H H T
H T T
H T H
T T H
T T T

But If the question is to make all heads, so there are at most 7 flips

H H T
H T T
H T H
T T H
T T T
T H T
T H H
H H H