eBay Interview Question

code 8 queens problem