Question: There are six drinking glasses standing in a row, with first three full of juice and the next three empty? How can you arrange those glasses so empty and full glasses alternate by moving only one glass?
Here’s why: Man 3 and 4 cannot see the other hats.
Man 1 sees a white hat and a black hat and knows his hat can be black or white.
Man 2 sees one black hat , but if he is also wearing a black hat, it would be obvious to Man 1 that he is wearing a white hat. Since Man 1 did not shout out, Man 2 concluded that he himself is wearing a white hat.
Ans credits: RedTaurus