There are 100 prisioners standing in a queue. Noone can look behind or on top of their head. Means everyone is looking in one direction i.e. in front.
A prisoner can c d color of the caps of all d prisoners standing in front of him.
Now there is an executer who tells them dat he will put caps on their heads. He told dem dat dere wud be only two colors...Black or White...but didnt tell dat how many wud be black or white. Means dere can be any combination of black and white caps. He told dem he will start frm the end of the queue and ask the color of the cap that prisoner is wearing. If he answers correctly he will spare him and if he answers wrong he will kill him and den he will move forward and ask the same question to the prisoner standing in front of previous prisoner. Dis way the executer will move forward in queue and ask the question to every prisoner.
Before all this happend he told them that they can plan any strategy among demselves and try to save as many prisoner as dey can among demselves!!