![]() |
Created by Malachy Moran-Tun
over 3 years ago
|
|
![]() |
Copied by Malachy Moran-Tun
over 3 years ago
|
|
Question | Answer |
What is an Abstract Data Type? | > Created by the programmer > Not defined within the programming language > Easy to represent in graphical forms > Programming languages require other data types to represent them |
What are some Examples of Abstract Data Types? | > Queues > Stacks > Trees > Graphs |
What is a Static Data Structure? | A data structure with a fixed size: it cannot increase in size, or decrease and free up memory (while the program is running): an array. |
What is a Dynamic Data Structure? | > Collection of data in memory that has the ability to grow or shrink in size > Uses a heap - a portion of memory where space is automatically allocated or de-allocated when required > Supported in Python, Java, and C (amongst others) |
What are the Advantages and Disadvantages of a Static Data Structure? | > Suitable for storing a fixed number of items without exceeding memory > The size has to be decided in advance, meaning that no more can be added if the number of items fills up, regardless of how much free space there is in memory |
What are the Advantages and Disadvantages of a Dynamic Data Structure? | > Useful for implementing data structures where the maximum size of the data structure is not known in advance > Methods or functions may already be written in advance in the programming language (e.g.: lists in Python) > The data structure can potentially cause an overflow and crash the program if it exceeds the maximum memory limit |
There are no comments, be the first and leave one below:
Want to create your own Flashcards for free with GoConqr? Learn more.