There are $n$ people in room each being put on hat from amongest at least $n$ white hats and $n-1$ black hats. They stand in a queue, so that everyone can see the colour of the hat of the person standing in front of him.
Starting from the back we ask the person in turn, "Do you know the what is the colour of your hat?" If the first $n-1$ person say no, prove that front person will say "Yes colour of my hat is white."

I'm supposing every person can see the color of all the hats in front of him.
If the last person in the queue says $no$, then every one hears his reponse and then knows that there is at least $1$ white hats on the head of the first $n-1$ persons. Because otherwise the last person can deduce his own hat is white.
Now for the second last person, if he sees no white hat in front of him, then he knows his own hat is white. But he says still $no$, which means there is at least a white hat in front of him. And his response is heard by everyone and everyone knows there is at least a white hat on the head of the first $n-2$ persons.
Similarly, if one person says $no$, this means there is at least a white hat in front of him and everyone knows that information after they hear the response.
So finally the first one knows his hat is white..