Let's say I have 36 elements in my array and I would like to delete elements 10,11 and also 10+i*12 and 11+i*12
I mean for example 10,11,22,23, 34 and 35 when i starts from 0 to 3
What is the simplest way to implement this
You'll need a For Loop. You'll need a shift register to maintain the array between iterations as you proceed to delete each element.
I'd recommend deleting the last elements first because if you delete an earlier element, all of the index values of the later elements will shift forward by 1.
This code actually conditionally (re)builds the resulting array rather than deleting elements, which provides the same effect.