eBay interview question

code 8 queens problem