Update Insertion or deletion on a sorted array

A program to insert/delete a given element in sorted array. The array should remain sorted after the insertion/deletion is performed.