Unit 2 Flashcards
(39 cards)
array
data structure which contains several items of the same data type
-can be thought of as table, with bounds (0-n) and index/subscript
tuple
ordered list of elements
initializing an array
amount of space needed has to reserved
+change bounds to change num of elements
+declare elements in one statement
+loop structures for quick proccessing
+single identifier
list
abstract data structure and dynamic
records
different data types, data structure which consists of a collection of elements, each separate item is a field (fixed length)
file
each row is a record, each separate item (piece of data) in record is called field
-all records have the same number of fields and all fields have same fata type
-need a key field or primary key
initializing an array
int[] Votes = new int[4]
static
cannot change size while program is running (array)
dynamic
can change size as program is running (linked list, tree)
data held serially
points to next item in list
data held sequentially
points to next item of data in alphabetical order
pointer
indicating the address of the start of the list
linked list
not all space in use,free space indicated as list and used for other things
heap
memory space allocated for data structure to grow
queue
first in first out data structure, front and rear pointer (when empty rear pointer is -1), circular queues override date, priority queue
stack
last in first out
graph
dynamic data structure commonly used to represent several types of data network
dense
more edges than nodes
sparse
more nodes than edges
weighted
edges are given values
directed
edges given direction
node
the point with the information you want to get
edges
how you get from one node to the next (lines)
degree
how many edges come off a node