Lesson 1: Overview of Data Structures Flashcards
Most used in defining algorithms which is an English-like representation of the algorithm logic
Pseudocode
Can be used to represent both data structures and code
Pseudocode
Used to describe an algorithm
Pseudocode
A set of instructions designed to perform a specific task
Algorithm
In computer programming, these are often created as functions. These functions serve as small programs that can be referenced by a larger program.
Algorithm
What are the components of an algorithm? (clue: HPRNVCA)
Algorithm HEADER
PURPOSE, Conditions and Return
Statement NUMBERS
VARIABLES
Statement CONSTRUCTS
Algorithm ANALYSIS
What are the uses of algorithm? (clue: RPM)
Real-world data storage
Programmer’s tools
Modelling
A set of instances or values
Data Objects
Examples of Data Objects (clue: LDBNIS)
Letter
Digit
Boolean
Natural Number
Integer
String
[Data Objects] A, B, C, …, Z, a, b, c, …, z
Letter
[Data Objects] 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
Digit
[Data Objects] true, false
Boolean
[Data Objects] 0, 1, 2, 3, …
Natural Number
[Data Objects] 0, ±1, ±2, ±3, …
Integer
[Data Objects] a, b, …, aa, ab, ac, …
String
Types of Data (clue: PC)
Primitive (Atomic) Data
Composite Data
[Types of Data] Each instance of the data object cannot be further be decomposed
Primitive (Atomic) Data
Individual instances of a data object called as ______
Elements
[Types of Data] Can be broken out into subfields but still have meaning
Composite Data
Two Parts of Data Type (clue: SO)
a SET of data
the OPERATIONS that can be performed on the data
Three basic data types that can be found in all systems (clue: IFC)
Integer
Floating Point
Character
A data object together with the relationships that exist among the instances and among the individual elements which compose an instance
Data Structure
An aggregation of atomic and composite data into a set with defined relationships
Data Structure
_____ means a set of rules that holds the data together
Structure
Example of data structure:
array
record
For the most data structures, it must know to do the following: (clue: ISDTSR)
INSERT a new data element
SEARCH for a specified element
DELETE a specified element
TRAVERSE through all the elements
SORT elements
RECURSION
A special kind of data type whose behavior is defined by a set of values and set of operations
Abstract Data Type (ADT)
A declaration packaged together with the operations that are meaningful for the data type which encapsulate the data and the operations on the data, then hide from the user
Abstract Data Type (ADT)
ADT Implementations (clue: AL)
Array Implementation
Linked List Implementation
the sequentiality of a list is maintained by the order structure of elements in the array, also known as indexes
Array Implementation
an ordered collection of data in which an element contains the location of the next element or elements
Linked List Implementation
Two parts of an element in a linked list (clue: DL)
DATA
one or more LINKS