Amazon Interview Question

A problem similar to N-Queens for the coding portion.