yes they are shifted
that's why you should use std::deque whenever that matters

http://www.cplusplus.com/reference/stl/vector/erase/

"""
Because vectors keep an array format, erasing on positions other than
the vector end also moves all the elements after the segment erased to
their new positions, which may not be a method as efficient as erasing
in other kinds of sequence containers (deque, list).
"""


On Sat, Oct 1, 2011 at 1:21 PM, shady <[email protected]> wrote:
> nice question, Vector are implemented as arrays so they are shifted unlike
> linked list.
>
> On Sat, Oct 1, 2011 at 9:34 PM, SAMMM <[email protected]> wrote:
>>
>> Just wondering when a element in a Vector is deleted/removed , is the
>> preceding elements r shifted left or it behave like a linked
>> list???????
>>
>> For both Java and C+++ ...
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Hatta

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to