Binary Pigeons

There are N pigeons standing one after another in a straight line. There are two kinds of pigeons: white pigeon (’W’) and black pigeon (’B’). We can represent the ordering of pigeons by string(S). For example, WWB means a white pigeon is standing in the first position, another white pigeon is standing in the second position and a black pigeon is standing in the third position.


This is a companion discussion topic for the original entry at https://toph.co/p/binary-pigeons