Newton School Interview Question

basically from array and strings