applications of linked lists and mostly used linked list?

Answer Posted / sreejith menon

Used mainly to represent elements in a dynamic environment where it is added on an ad-hoc basis.
Especially in the cases where the total number of elements in the list cannot be pre-decided, linked lists are used. This does not lead to space insufficiency or space wastage as in case of arrays.
For eg. The no. of terms in a order-n polynomial varies greatly, using an array to store the co-efficients is an inefficient methods. If the array size is declared 100, a quadratic equation will use just 3 index and the rest 99 will be wasted. While for a sine or cosine series (from x to infinity) an overflow error might occur..!

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the maximum size of array?

486


Is it legal to initialize list like this?

551


What are skew trees? For a tree with 4 nodes draw all possible binary? Generalize for n nodes how many binary trees can be drawn?

629


How to get largest and smallest number in an array?

534


Define the tree data structure.

514






What do you mean by general trees?

542


Describe the complexity of Binary search

547


Do you know how to find if linked list has loop?

642


Is queue fifo or lifo?

490


What is a vector class?

489


What are the applications of b-tree?

556


Why is sorting necessary?

482


Which is better than array and linked list?

514


Explain the uses of matrix with an example?

550


When should structures be passed by values or by reference?

574