PRELIM Flashcards
Collection of raw facts.
Data
Representation of the
logical relationship existing between
individual elements of data.
Data structure
Basic structures directly operated upon
by machine instructions.
Primitive Data Structure
Primitive Data Structure Examples
Integer, Floating-point
number, Character constants, String
constants, Pointers, etc.
Initializing or declaring a new
data structure (e.g., creating an integer
or a float).
. Create
More sophisticated structures derived
from primitive data structures.
Non-Primitive Data Structure
Accessing or retrieving a
specific element from the structure (e.g.,
selecting a particular value stored in an
integer variable).
Selection
Modifying the value of an
existing element (e.g., changing the
value of a variable).
Updating
Removing a data
element or deallocating the memory
used by the data structure (e.g., deleting
or clearing a variable).
Destroy/Delete
Accessing each element in
the data structure exactly once to
process it (e.g., going through a list or
array to print its elements).
Traverse
Combining two data structures
into one, often while maintaining a
specific order (e.g., merging two sorted
arrays into one sorted array).
Insert
Finding the location of a
specific element in the structure (e.g.,
searching for a value in an array or a
node in a tree).
Search
Arranging elements in a particular
order, such as ascending or descending
(e.g., sorting an array of integers).
Sort
Combining two data structures
into one, often while maintaining a
specific order (e.g., merging two sorted
arrays into one sorted array).
Merge
Operations on
Primitive Data Structures
Create:
Selection
Updating
Destroy/Delete
Operations on
Non-Primitive Data Structures
Create
Traverse
Insert
Delete
Search
Sort:
Merge
Destroy/Delete
A linear array with one row or
column.
One-dimensional array
A set of finite homogeneous
elements (same data items).
Array
A matrix-like array with rows and
columns.
Two-dimensional array
Arrays with multiple subscripts.
Multi-dimensional array
A linear data structure where the
operations are performed in LIFO (Last In, First Out) order.
Stack
Adds a new item to
the top of the stack
push(item)
Removes the top item
from the stack.
pop()
Returns the top item
without removing it.
peek()