Static list vs Dynamic List

From Static and Dynamic List chapter in PU/ Data Structure and Algorithm

Asked by arjun adhikari on 21 Aug, 2020

Like 0 Dislike 305 Views

What are static lists and dynamic lists? and what are their differences ?

Add a comment

1 Answers

Alson Garbuja on 2 Sep, 2020 Like 0 Dislike

Static List is those kinds of lists that cannot be changed during the whole program. (ie memory allocation is done in compile time)

Dynamic List is those kinds of lists that can be changed during the program. (ie memory allocation is done at runtime)

Static List Dynamic List
Memory allocation is done in compile time. Memory allocation is done in runtime.
Data is stored in a stack. Data is stored in the heap.
Data cannot be changed during the program. Data are determined during the program.
The Max size is predetermined. The Max size of the list can be determined during program time.
Add a comment


Add your answer