Google Interview Question

How to add an item into an array and update the array so that there are no gaps