Infosys interview question

Find a element in sorted array and insert if it not exist.

Infosys Interview Question: Find a element in sorted array and insert if it not exist. | Glassdoor