Lesson 1.4: Data Structures Flashcards
Is a logical model of a particular organization of data. The programs have to follow certain rules to access and process the structured data.
data structure
data structure is represented as:
Organized Data + Allowed Operations = Data structure (ODAO)
Advantages of Data Structures
Efficiency, Reusability and Abstraction
The (2) types of data structures are:
Linear and Non-Linear Data Structures
The elements of these data structures form a sequence, i.e. linear list. Common examples are arrays, linked lists, stacks, and queues.
Linear Data Structures
The elements do not form a sequence. Common examples are trees and graphs.
Non-Linear Data Structures
The organization of the data in a way so that it can be used efficiently.
Data Structures
When a program runs, some memory blocks are allocated to them.
Memory Allocation
Memory is allocated to the entities by the Operating System. Once the memory blocks are allocated to the entities, they remain reserved till the end of the program.
Static memory allocation
Memory is allocated dynamically to the entities of the program. Programmer has freedom to allocate and free the memory for the program entities.
Dynamic memory allocation