Now the same puzzle with different condition. Instead of two red and two blue hats there are 3 hats of one colour and only 1 hat of another, and the 3 prisoners can see each other i.e. A sees B & C, B sees A & C and C sees A & B. D again not to be seen and only there to wear the last hat.
Answer: http://good-interview-puzzles.blogspot.com/2011/08/solution-puzzle-prisoners-and-four-hats.html