Explain N Queen Problem Leetcode