算法
文章平均质量分 86
dead_of_winter
from ATC
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
优化递归的效率
函数递归调用是很常见的做法,但是它往往是低效的,本文探讨优化递归效率的思路。1.尾递归转换成迭代尾递归是一种简单的递归,它可以用迭代来代替 比如 求阶乘函数的递归表达int f(int n)...{ if(n0)return 1; return n*f(n-1);}可以转换成完全等价的循环迭代int f(int n)...{ int r=0;原创 2007-06-21 13:56:00 · 3841 阅读 · 2 评论 -
[转载&翻译]prototype oriented
来自http://www.brainyencyclopedia.com/encyclopedia/p/pr/prototype_oriented.htmlPrototype-based programming is a style and subset of object-oriented programming in which classes are not present, and be翻译 2007-06-09 22:33:00 · 1157 阅读 · 0 评论
分享