51. N Queens Leetcode Solution