面试题解(2):loop相关
摘要: 从网上收集来的一些面试题和解题思路,加以整理,供参考。1.(比较无聊的循环)Change/add only one character and print '*' exactly 20 times.(there are atleast 3 solutions to this problem :-)int main(){int i, n = 20;for (i = 0; i < n; i--)...
阅读全文
posted @
2008-02-03 09:54 Silent Void 阅读(372) |
评论 (2) 编辑
面试题解(1):单向链表相关
摘要: 0. 一个单向链表,请设计算法判断该链表中有没有环?
1. 两个单向链表,有可能交叉,请设计算法判断是否交叉,如果交叉,返回交叉点。
阅读全文
posted @
2008-02-02 16:53 Silent Void 阅读(2191) |
评论 (7) 编辑