1/23
Vocabulary flashcards for OCR Computer Science AS Level 1.4.2 Data Structures
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Array
An ordered, finite set of elements of a single type.
Linear Array
A one dimensional array.
Two Dimensional Array
You can visualise it as a spreadsheet/table.
Three Dimensional Array
A three dimensional array can be visualised as a multi-page spreadsheet.
Record
A row in a file
Record
A record is made up of fields.
Identifying a field from a record using programming
recordName.fieldName
List
A data structure consisting of a number of items, where the items can occur more than once.
Differences between arrays and lists
Tuple
An immutable, ordered set of values of any type.
Difference between a tuple and an array
Tuples are initialised using regular brackets instead of square brackets.
Stack
A last in first out data structure, where items can only be removed from and added to the top of the list
Example of where stacks may be used
Queue
A first in first out data structure, where items are added to the end of the queue and removed from the front of the queue.
isEmpty() operation (Stacks)
Checks to see if the stack is empty
push(value) operation (Stacks)
Adds a new value to the top of the stack
peek() operation (Stacks)
Returns the top value of the stack without removing it
pop() operation (Stacks)
Returns and removes the value at the top of the stack
size() operation (Stacks)
It returns the size of the stack
isFull() operation (Stacks)
Checks to see if the stack is full.
enQueue(value) operation (Queues)
Adds the value to the end of the queue
deQueue() operation (Queues)
Removes the item from the end of the queue
isEmpty() operation (Queues)
It checks to see if the queue is empty
isFull() operation (Queues)
Checks to see if the queue is full