Содержание
- 2. Time estimating in machine Machine measures time in 2 ways: For itself, by counting ticks For
- 3. What about Java
- 4. Another method Another way to calculate elapsed time is System.currentTimeMillis() method: long startTime = System.currentTimeMillis(); //
- 5. Storage estimating Storage refers to the data storage consumed in performing a given task, whether primary
- 6. The RAM model of computation The RAM model of computation estimate algorithm according the following rules:
- 7. Big O notation In Big O notation we are interested in the determining the order of
- 8. Calculate n-th Fibonacci number (n = 0) Number of steps: 5
- 9. Calculate n-th Fibonacci number (n = 1) Number of steps: 6
- 10. Calculate n-th Fibonacci number (n > 1) Number of steps: 9 + n + 3(n-1) =
- 11. Fibonacci number
- 12. Time complexities
- 13. More examples
- 14. Counting sort Sample output: n = 20 k = 25 A = 12 2 22 24
- 15. Task #1 Implement “counting sort” that sorts an array of integers Use Math.Random() or r.nextInt(k) to
- 17. Скачать презентацию