g*e
2 楼
一个粗俗点的办法,就是用一个stack,stack里面每个元素存每个Iteration所有的变
量。
foo(argument(s) arg) {
argument a, b;
// compute a, b from arg
foo(a);
foo(b);
}
stack stk;
while(!stk.empty()) {
argument top=stk.top();
argument b= // compute b from top
argument a= // compute a from top
stk.push(b);
stk.push(a);
}
量。
foo(argument(s) arg) {
argument a, b;
// compute a, b from arg
foo(a);
foo(b);
}
stack
while(!stk.empty()) {
argument top=stk.top();
argument b= // compute b from top
argument a= // compute a from top
stk.push(b);
stk.push(a);
}
y*n
3 楼
有点道理,慢慢体会一下。
相关阅读
Amazon Senior Manager vs. 中西部 direcor人在加拿大, 找美国工作问题Maximal Rectangle O(mn) 解法 非 histogramB家電面忘了填写6年前仅1个月的工作,背景调查有问题么?西雅图 找人合租寻朋友一起找工作如果3年半或者4年拿了master,公司招人时会不会成为缺点?什么是面试题的“代码质量”?请问Brainbench的C++测试是什么类型的问题?关于从国内申请FLMGA网申G家,HR让发undergraduate成绩单,请问怎么理解?招聘:Mechanical Engineer R&D, 休斯顿-油服公司应该主力练习C++还是JAVA请教A在湾区的机会我来说一下苹果请大牛推荐一下书目C++的 多线程,网络和socketEECS PhD 找工作准备方向如果job description是这样,是不是说明已经找好了?