Java Tutorial: Sequential and Linked Representation
ADTs can generally be represented using sequential and linked representation. It is easier to create the sequential representation with the use of arrays. However, the problem with an array is its limited size, making it inflexible. Memory space is either wasted or not enough with use of arrays. Consider this scenario. You’ve created an array and declared it to be able to store a maximum of 50 elements. If the user only inserts exactly 5 elements, take note that 45 spaces would have been wasted. On the other hand, if the user wants to insert 51 elements, the spaces provided in the array would not have been enough.
Java Tutorial: Sequential and Linked Representation
Compared to sequential representation, the linked representation may be a little more difficult to implement but it is more flexible. It adapts to the memory need of the user. A more detailed explanation on linked representation are discussed in a later section.
ADTs can generally be represented using sequential and linked representation. It is easier to create the sequential representation with the use of arrays. However, the problem with an array is its limited size, making it inflexible. Memory space is either wasted or not enough with use of arrays. Consider this scenario. You’ve created an array and declared it to be able to store a maximum of 50 elements. If the user only inserts exactly 5 elements, take note that 45 spaces would have been wasted. On the other hand, if the user wants to insert 51 elements, the spaces provided in the array would not have been enough.
Java Tutorial: Sequential and Linked Representation
Compared to sequential representation, the linked representation may be a little more difficult to implement but it is more flexible. It adapts to the memory need of the user. A more detailed explanation on linked representation are discussed in a later section.



