merge sorted array and pascals triangleII and remove duplicates from sorted array