public class Solution { public int removeDuplicates(int[] A) { //http://needjobasap.blogspot.com/2014/01/remove-duplicates-from-sorted-array-ii.html // 我觉得这个做法还是最简洁的,我觉得我还可以抢救一下,我之前困惑是尼玛想复杂了,认为只能记录2个的,人家是“at most twice” if(A==null || A.length<1) return 0; int ind =1, cnt = 1; for(int i =1; i