eBay Interview Question

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