离散数学北京邮电大学.ppt

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Example 1: Max algorithm Problem: Find the simplest form of the exact order of growth (?) of the worst-case time complexity (w.c.t.c.) of the max algorithm, assuming that each line of code takes some constant time every time it is executed (with possibly different times for different lines of code). Complexity analysis of max procedure max(a1, a2, …, an: integers) v := a1 t1 for i := 2 to n t2 if

文档评论(0)

1亿VIP精品文档

相关文档