Linked lists are used wherever the amount of data changes often or is not known in advance. This page shows the classic textbook application, polynomials, and then sums up when to choose an array and when a linked list.
Polynomials as linked lists
Each node holds one term: a coefficient, an exponent and a link to the next term. The nodes are kept in decreasing order of exponent, and only non-zero terms are stored.
Compared with the array of terms in Unit 2, the linked version can grow without a fixed maximum, and a term can be inserted or removed without shifting. Addition uses the same merge idea: walk both lists together and append a node to the result for each exponent.
Arrays versus linked lists
Array (contiguous) list
Linked list
Size
Fixed in advance; overflow possible
Grows and shrinks at run time; “full” only when memory runs out
Memory per element
Data only
Data + one or two pointers
Access to the i-th element
O(1) (random access)
O(i) (sequential access)
Insert/delete at a known place
O(n) (shifting)
O(1) (pointer changes)
Binary search
Possible on sorted data
Not possible (use a skip list)
Memory layout
One contiguous block, cache-friendly
Nodes scattered in memory
The summary of the study material puts it briefly: lists are flexible and avoid overflow, but the links take extra space and lists are not suited to random access.
Which list where?
Kind of list
Typical applications
Singly linked
Stacks and queues (Units 4–5), adjacency lists of graphs (Unit 8), chaining in hash tables (Unit 10), polynomials, sparse matrices
Doubly linked
Browser back/forward history, undo/redo in editors, LRU caches, music players with previous/next
Circular
Round-robin CPU scheduling, multiplayer turns, repeating playlists
Skip list
Sorted sets and indexes (e.g. Redis), concurrent sorted maps
Key takeaways
A polynomial node holds (coef, exp, next); terms are kept in decreasing exponent order and added by merging in O(m+n).
Linked lists: flexible size, O(1) pointer changes, O(n) access, extra memory for links.
Singly, doubly, circular and skip lists each suit different access patterns.
Practice questions
Answer on paper first, then check. The explanation matters more than the letter you chose.
Question 6 · short answer
Compare arrays and linked lists as implementations of the list ADT (at least four points).
Show worked answer
(1) Size: an array’s size is fixed when it is created and can overflow; a linked list grows and shrinks at run time and is limited only by available memory. (2) Access: an array gives O(1) access to any element by index; a linked list needs O(n) sequential access. (3) Insertion/deletion: an array must shift elements, O(n); a linked list only changes pointers, O(1) once the position is known. (4) Memory: an array stores only data in one contiguous block; a linked list needs one or two extra pointers per node and its nodes may be scattered. (5) Searching: a sorted array allows binary search, O(logn); a sorted linked list needs O(n) (unless it is a skip list).
MCA Online notes are made for reading on screen. Open https://mcastudy.online/mcs-208/lists/applications-of-linked-lists/ to read this page.