ABC Interview Question

Array and object iteration question