COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
dynamic and static
|
|
static and dynamic
|
|
static and static
|
|
dynamic and dynamic
|
Detailed explanation-1: -The array is the popular and perfect example of static data structure while linked lists, trees, heaps, etc are examples of dynamic data structures.
Detailed explanation-2: -Recall that a dynamic data structure is one in which it can grow or shrink in size. Lists and trees, to be looked at next, are examples of dynamic structures.
Detailed explanation-3: -An ArrayList is a dynamic data structure where items can be added and removed from the list. So if you are not sure about how many elements will be there in your array, this dynamic data structure will save you.
Detailed explanation-4: -A static data structure is one that has a fixed size and cannot change at run time A dynamic list is able to adapt to accommodate the data inside it and so it does not waste as much space.