IBM Interview Question

DSA array traversal and list traversal