MAQ Software Interview Question

Queens 8 problem