About the Queen's Problem - Algorithm