Pergunta de entrevista da empresa TikTok

Solve N queen problem. How many possible ways are there?