Skip to content

注意点

  • $O()是上界,\Omega()是下界,\Theta()是等价量,o()是严格上界,也就是不能同阶$

判断题

  • the major task of algorithm analysis is to analyze the time complexity and space complexity
  • $O(N^2)$ is the same as $O(1+2+3+...+N)$ (仅考虑阶数)
  • any$N^k, k>0$ satisfies that it is greater than $log_p^N$

单选题

  • 当我们比较不同的算法之间花费时间的speed of growth时,如果只相差一个常数项的倍数,那么可以说这两个算法的speed of growth是相同的。所以在我们讨论不同算法的speed of growth时我们只在讨论该算法的阶数。
  • 第六题:仍然存疑!!这里指的space complexity指的是调用栈的深度还是指的暂时存储队列的长度?

算法题

  • pop在这里的意思是“砰的一声”,也就是把气球给扎破了