|
Array -based (Static) Memory Allocation |
Pointer -based (Dynamic) Memory Allocation |
| Advantages | Disadvantages |
|
Easy to use / code |
Difficult / hard to code + More care needs to be practiced |
|
Good to use when the size of the problem is fixed |
Good to use when the size of the problem is not determined |
|
speed up search , ith item accessed directly |
slow search , ith item accessed directly |
| Disadvantages | Advantages |
|
Can waste space |
Optimum use of space |
|
Need shift in insertion and deletion , so it wastes time . |
Good for insertion and deletion , No need to shift elements |