Example 11 - verbose

both. and it is more efficient to do it in one pass.