N Queens Leetcode Solution In Java