- 博客(3)
- 资源 (1)
- 收藏
- 关注
转载 《算法导论》课程笔记(2)- 渐近符号、递归及解法
渐进符号所有记号都表示一切满足条件的函数的集合。1、Θ记号 Θ(g(n)) = { f(n) : 若存在正常数c1,c2和n0,使对所有n>=n0时有0 其效果相当于删除f(n)中的低阶项,并忽略最高阶项的系数。 2、Ο记号 Ο(g(n)) = { f(n) : 存在正常数c和n0,使对所有n>=n0,有0
2016-01-20 10:32:27 2587 1
原创 258. Add Digits
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has on
2016-01-10 22:38:29 258
原创 292. Nim Game
You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the
2016-01-10 21:39:02 332
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人