DATA STRUCTURE PRELIMS Flashcards
building blocks of any program or the software
DATA STRUCTURE
an elementary value or collection of values
DATA
data items which have subordinate data items
GROUP ITEMS
the collection of various data items
RECORD
collection of various records
FILE
represents the class of certain objects
ENTITY
represents the particular property of an entity.
ATTRIBUTE
The primary goal of data structure
CORRECTNESS
It should process the data at high speed without utilizing much of the computer resources such as memory space
EFFICIENCY
3 FEATURES OF DATA STRUCTURE
- ROBUSTNESS
- ADAPTABILITY
- REUSABILITY
consist of the numbers and the characters which are built in programs.
PRIMITIVE DATA STRUCTURES
These can be manipulated or operated directly by the machine level instructions
PRIMITIVE DATA STRUCTURES
Basic data types such as integer, real, character, and Boolean come under __________
PRIMITIVE DATA STRUCTURES
Primitive data structures is also known as ___________
simple data types
Derived from primitive data structures
NON-PRIMITIVE DATA STRUCTURES
Cannot be manipulated directly by machine level instructions
NON-PRIMITIVE DATA STRUCTURES
A data structure that maintains a linear relationship among its elements
Linear data structure
Hierarchical relationship between individual data items
Non linear data structures
collection of items stored in contiguous memory locations
ARRAY
can be seen as a table with ‘x’ rows and ‘y’ columns
Two dimensional arrays
provides a dynamic way of manipulating data
ARRAYLIST
This constructor is used to build an empty array list
ArrayList()
This constructor is used to build an array list initialized with the elements from collection c
ArrayList(Collection c)
This constructor is used to build an array list with initial capacity being specified
ArrayList(int capacity)
a linear data structure that follows a particular order in which the operations are performed
STACK
what operation adds to the top of the list, hiding any items already on the stack, or initializing the stack if it is empty
push
what operation removes an item from the top of the list and returns this value to the caller
pop
responsible for inserting (copying) the value into the array and for incrementing the element counter (size).
push()
operation used to delete or remove a data item or element at the top of the stack
pop()
operation to determine the size (number of items) of the Stack
size()
method that looks at the item at the top of a stack
peek()
a method that returns the position (in number) of an item from the top of a stack
search()
a method that tests if a stack object is empty or not.
empty()