Pregunta de entrevista de UniCourt

I had to solve modified n queens with an optimal solution.