Flexport Interview Question

the first one is to implement checker board