Full Visibility Interview Question

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