Prisoner Hat Puzzle - who will shout first?

4 prisoners are are given a hat each from 2 blue and 2 yellow hats. Find out who will shout first and declare his own hat color?

All know that there are 2 blue and 2 yellow hats.
They do not know their own hat color.
4 can see 3 and 2s hat color
3 can see 2s hat color and 1 can see only the wall.
No speaking or touching. No mirrors. No movements.

Please check out the video which explains the solution to this problem.

Please try solving this problem before jumping on the solution

Click to learn

Subscribe for more updates

Preparing for interviews? IDeserve team is here to help.

Hone your coding skills!

AngryNerds Practice platform »


  • Sincere thanks from IDeserve community to Virendra Karappa for compiling current post.

    Virendra Karappa

    Ninja Programmer