queue
FIFO data structure: ordered collection of items added at the rear and removed from the front. sequence depends on order inserted, size depends on number inserted
array
a finite, ordered set of elements of the same type. grouped under one identifier, each element addressed using index
index
used to reference EACH element of an array
elementary data type
data type built into a programming language e.g. VB, pascal, python
tuple
dynamic data structure: ordered set of elements not necessarily of the same type able to inc/dec in size
structural data type
collection of data (made up of a number of elements) of a specified type e.g. array, string, record
primitive data type
data type PROVIDED by a programming language
n-dimensional array
a finite, ordered set of elements of a specified type indexed by n integers
abstract data type
a data type created by the programmer rather than defined by the programming language.
logical description of how data is viewed and operations that can be performed on it
programmer decides how to build and implement it and uses data types from programming language, user just needs to know state and behaviour
uses data abstraction: encapsulation, hiding details and implementation from user
encapsulation
ensuring a subroutine is completely self contained and independent of any global variables
dynamic data structure
data structure (a COLLECTION of data of a specified type in memory) with the ABILITY to grow and shrink in size in run time, with the aid of a heap
heap
portion of memory which is AUTOMATICALLY allocated and deallocated space as required (dynamic data structures)
adv of dynamic data structures and built in dynamic data structure
disadv of dynamic data structures
static data structure
data structure (collection of data of a specified type in memory) which is fixed in size at compile time so can’t inc in size or free up memory whilst the PROGRAM IS RUNNING
adv static data structure
disadv static data structure
algorithm
a sequence of steps / set of rules SPECIFYING how to solve a problem, including inputs outputs and processing, written in a way it can easily be translated into high level code and then machine code for execution by the computer if in context of programming.
execute in finite time and produce an expected output for given inputs
a good algorithm
pseudocode
input and output pseudocode
print(“what is your name”)
myname= input()
OR
myname= input(“what is your name”)
integer
whole number
float/real
number with a fractional part
boolean
only takes values of true or false