IBM Interview Question

Iterate through a list of number