Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.