Please enable JavaScript.
Coggle requires JavaScript to display documents.
fundamentals of algorithms (representing algorithms (algorithm (def) (a…
fundamentals of algorithms
representing algorithms
algorithm (def)
a series of steps with start and end to solve a problem
decomposition (def)
breaking down a problem into sub problems and solving the sub problems
abstraction (def)
removing unnecessary detail from a problem
pseudo code and flowcharts!
inputs, outputs and processes
trace tables
determine purpose of algorithms
efficiency of algorithms
multiple algorithms can be used to solve same problem
time taken
number of lines
searching algorithms
linear
go through list one by one
pros
simple to code
doesn't have to be sorted
cons
takes longer normally
not efficient
binary
split in half - if more than value, eliminate right half if less, eliminate left hald
pros
quick
efficient
cons
has to be sorted
harder to code
sorting algorithms
merge
split numbers up. sort, then merge
pros
efficient
quick
cons
harder to code
bubble
compare first two, then next two and so on, if any changes repeat process until all sorted
pros
simple to code
cons
takes ages
inefficient