1,Easy and Hard for Persons
- 会者不难,难者不会。
- 人不会,计算机必然不会。
2,Easy and Hard for Computers
- 算得快还是慢,算上十年跟不会算一样。
3,Problems
- 3.1,乘法,计算,easy
- 3.2,因子分解,把n分解成因子的乘积,n=a×b, hard
Big-O notation
计算时间和问题大小的关系。
- \(O(n)\),线性的,
- \(O(\log n)\),对数级的,
- \(O(n^2)\),平方级的,
- \(O(2^n)\),指数级的,