this maybe an easy question but maybe some of you can say the answer.
I am looking for a data structure which allows to delete a *specific* element from a set? which data structure should I use for it?
For example using stack is not quite right for me because it allows to delete only the *top* element, not element say which is located in the middle.
if I use an array, and delete say an element in the middle, then I have to rearrange the elements in the array so that I put an existing element in the place of the element I deleted; I want the data structure to do this automatically.
hope i was clear. thanks!