solve the remove duplicate from sorted array II problem. :