Two Pointers: Remove Duplicates from Sorted Array II
Given a sorted array, remove the duplicates in place such that each element can appear at most twice and return the new length.
Do not allocate extra space for another array, you must do this in place with…