SEARCH
You are in browse mode. You must login to use MEMORY

   Log in to start

level: Abstract Data Type

Questions and Answers List

level questions: Abstract Data Type

QuestionAnswer
Whats ADT stand forAbstract Data Type
Give some examples of Abstract Data Typesqueue stack graph tree hash table dictionary vector
What is a set?Collections of data with no order
Whats a primitive data type?A data type that is built into a programming language, or one that could be characterized as a basic structure for building more sophisticated data types
What is a composite data typeA composite data type is a datatype made of other datatypes e.g. array, lists etc...
Give some examples of composite data typesarrays, lists, and strings
Give some examples of primitive data typesInteger, double, character, bool
What is an Abstract Data TypeA logical description of how the data is viewed and the operations that can be performed on it.
Describe a sequence of itemsEach item (except the first) will have a predecessor; each item (except the last) will have a successor
Whats the difference between an Abstract Data Type and a Data StructureAn ADT can be implemented in different ways
State the advatantages of static structuresTakes same constant time to access any elements n the array
State the disadvatantages of static structuresWaste of space, as they have to be overdimensioned ​ Limited amount of space Can take longer to add and remove items
State the advatantages of dynamic structuresOnly use the memory needed, avoid wasting memory space​ Flexible to grow and shrink​
State the disadvatantages of dynamic structuresResize operation takes time​ In dynamic structures such as a linked list the access time depends on the position of the element in the structure​ Storage overhead for pointers (linked lists and trees)​
Define what a static data type isA datatype that cannot change at runtime
Define what a dynamic data type isA datatype that can change at runtime
What are pointers for datasystems?Pointers are the variables that are used to store the location of value present in the memory
What are some of the difference between static and dynamic datastructures?Static datastrutures have storag size determined at complie time whereas dynamic strcutures can change at run time Static data stuctures have a fixed size but dynamic structures can change Dynamic structures require more memory space casue of pointers Static data structures can waste storage space if the number of elemnets to store is less than the size whereas dynamic is alwsays excactly whast needed Static data types TYPICALLY store data in consecutive meomory locations but dynamic structures TYPICALLY dont