A more concise version for  [2.1.2 Remove Duplicates from Sorted Array II]

The thought is copied from your solution for [2.1.1 Remove Duplicates from Sorted Array].