Isn't that just removing the element at the "del" position in the array? That's not what OP needs. "del" is the number to be deleted, not the element. For instance, in what I posted, the number 10 is to be deleted, but it first appears in the 3rd element.