eBay interview question

Backtracking related : 8 queen. Stacks, Heap and Tree. Array question