Infosys Interview Question

remove duplicates from sorted array