Elbit Systems Interview Question

Write a function that resets, inserts, and returns values ​​to the array according to run times requested by the interviewer