Algorithms and Programming Flashcards
Algorithm
A set of instructions for solving a problem.
Decomposition
breaking problems down into smaller more manageable problems
Abstraction
removing of unnecessary detail
Flowchart
- shows process
- easy to read
- universal symbols
Merge sort
Divide then combine (more efficient on big lists, fast but difficult to code)
Bubble sort
comparing two next to each other(simple to code but slow)
Linear search
search each one (takes lots of memory)
binary search
split in the middle each time (needs to be list but faster on big lists)
Identifier
the ‘name’ given to a variable
Pseudocode
- easy for humans to understand
- easily be converted to code
Assigning
Giving a variable a value
MOD
returns the remainder of the division
DIV
returns the integer
AND gate
has to have two of the same to return 1
OR gate
1 or 0 returns a 1
NOT gate
flips the input round
syntanx
the SPAG of the code
Machine code
machine-level instructions that are uniquely read by computer processors using patterns of 1s and 0s.
Assembly code
A low level language that uses mnemonics to represent machine code instructions