Taboola Interview Question

loop over array and get the n number.