Professional Documents
Culture Documents
algorithm
while n ≠ 0 do
r ← m mod n
m← n
n←r
return m
Is this an algorithm?
Example: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
● Practical importance
● Iterative improvement
● Decrease and conquer
● Backtracking
● Transform and conquer
● Branch and bound
● Space and time tradeoffs
● searching
● string processing
● graph problems
● combinatorial problems
● geometric problems
● numerical problems
● list ● graph
• array ● tree
• linked list ● set and dictionary
• string
● stack
● queue
● priority queue