c - Difference between Vector and Linked list ADT -


can explain me difference between vector , linked list adt in c programming language context.

thanks.

well, in c, there no "vector" , "list" data types available directly in c++ std library. in terms of "abstract data type", vector considered represent contiguous storage, , linked list considered represented individual cells linked together. vectors provide fast constant time random-access read , write operations, inserting , deleting vector elements take linear time. lists have linear lookup performance find element read , write, given element location, have constant time insertion , deletion. can add items start , end of list in constant time (if adt implementation caches location of last element in list).


Comments

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -