Citadel Securities Interview Question

The question was about lego blocks, should be on code force.