I believe everyone gets different input and needs to produce a different result.
There can be multiple solutions.
Do you process as you are going, or do you parse and build a data structure to process later so you loop through the results multiple times.