How to remove duplicates from the sorted array

join shbcf.ru