Follow up for "Remove Duplicates": ?What if duplicates are allowed at mosttwice?
For example,?
Given sorted arraynums=[1,1,1,2,2,3],
Your function should return length =5, with the first five elements ofnumsbeing1,1,2,2and3. It doesn't matter what you leave beyond the new length.
不要想著把數(shù)原封不動的顛倒順序, 只要在返回長度范圍內(nèi)的數(shù)組是對的, 后面的值無所謂
