1/9
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
algorithm
process or set of rules to be followed or calculated to solve problems, especially by a computer
decomposition
breaking down a large problem into smaller, more manageable parts
abstraction
removing unnecessary details from a problem to allow focus on essential components
pseudocode
step-by-step descriptions of an algorithm written in simple english words using a code-like structure
why use pseudocode
planning before writing actual code
makes the logic easier to understand
reduces logical errors before implementation
differences between pseudocode and an algorithm
algorithms only use simple english-like words → pseudocode uses reserved keywords
algorithms are a sequence of steps → pseudocode is just fake code, using code-like structure
algorithms have strict syntax rules → pseudocode has certain rules, but less
algorithms can be difficult to understand and interpret → pseudocode is easy to understand and interpret
characteristics of a good algorithm
(CITEE)
clear and precisely stated steps
allows invalid inputs (without crashing)
terminates at some point, when needed
efficient, and in as few steps as possible
easy to maintain and understandable by others (for modification)
sorting algorithms (3 types)
merge: splitting and rejoining in order
insertion: having two lists: unordered and ordered list
bubble: comparing adjacent values and swapping if needed
searching algorithms (2 types)
linear: comparing each value, one by one
binary: compares middle value, then uses > or < to half the number of values, repeat→ MUST BE IN ASCENDING/ALPHABETICAL ORDER FIRST