The answer should be a vector because it uses an array to store the
elements internally and
since an array consists  of contiguous memory locations, sequential access
will be the fastest.
In contrast to SLL or a DLL, the nodes may be at random memory locations
and will not provide
the fastest sequential access.


On Thu, Nov 22, 2012 at 1:12 PM, atul anand <atul.87fri...@gmail.com> wrote:

> @shady : as subject says "fastest sequential access " , then if i am not
> getting it wrong.we only care of sequential access a value not modifying
> the linked list.
> so i guess double linked list would be helpful
> 1) bcozz it can move in both the direction , so if linked list is sorted
> then it would be a great help
> 2) if you want to insert element at the end of linked list then if will be
> better than vector
> so i guess it required 1-2 more parameter to decide ,which one to use.
>
> On Wed, Nov 21, 2012 at 8:21 PM, shady <sinv...@gmail.com> wrote:
>
>> which data structure among the follow has fastest sequential access ?
>> i)   vector
>> ii)  Singly linked list
>> iii) Doubly linked list
>>
>> it won't be doubly linked list as it involves more pointer manipulations
>> than singly linked list.......
>>
>> --
>>
>>
>>
>
>  --
>
>
>



-- 
Cheers

Praveen

-- 


Reply via email to