Please enable JavaScript.
Coggle requires JavaScript to display documents.
Abstraction - Coggle Diagram
Abstraction
Machine Language
Machine language is
binary
, made up of 0 and 1s.
Assembly is a language which is the
next level up
from machine language
Third generation
languages: Python, C++, Visual Basic.
Third generation languages are written in English like syntax.
These languages make it easier to write code than in something such as Assembly.
Python, C++, Visual Basic can run on various
Operating Systems
, whereas old languages such as COBOL and ABAP run on a specific O/S named
Unix
.
Run in
compilers
.
Fourth generation
languages also exist.
Abstraction in Algorithmics.
Fundamental data types
Number, characters.
Abstract data types
Arrays
I want to have 5 numbers: 5, 10, 20, 30, 50.
Ask the
Operating System
for memory. For example, say each number consumes 4 Bytes. The O/S will reserve 20 bytes of memory.
Arrays have an index,
starting with 0
: [0, 1, 2 . . . n-1]
Fixed time
to access any element of an array: O(1)
Cannot use multiple data types in an array
, as there is fixed time. Using other data types such as floats/floating point number, will have a different width (more bytes) than an integer.
Lists (linked lists)
Can overcome issues with arrays, where you need to know how much memory and use only one data type.
Made up of nodes, which contain the
data
and a pointer which has an address; end of the list is indicated by
null
pointer.
Terminology
Prepend
: Add to the beginning of the list. The head will now point to the prepended node, and the prepended node will point to the original first element.
Append
: Add to the end of the list. The original last node will now point to the appended node, and the appended node will point to
null
.
Delete
: Delete a node. Make the pointer before point to the one after.
Insert
: Inserts a node somewhere in the list.
Update
: Modify a node.