Flexport interview question

coding part is something like checkerboard