LeetCode 80. Remove Duplicates from Sorted Array II
Followupfor"RemoveDuplicates":Whatifduplicatesareallowedatmosttwice?Forexample,Givensortedarraynums=[1,1,1,2,2,3],Yourfunctionshouldreturnlength=5,withthefirstfiveelementsofnumsbeing1,1,2,2and3.Itdoes