Full Visibility interview question

How did you mentally deconstruct the larger problem into this bite-sized code sample?