最新文章列表

记一次面试

今天参加了一个phone interview,有几道题自己还记着。 1. c++析构函数为啥是虚函数。 2. 四个cast。 3. 类初始化列表。编译器为什么要按照声明中的顺序初始化? 4. 一个空类,编译器帮你实现了哪些default的函数。 4. IQ题。假设三个事件A,B,C,给你两枚硬币,如果根据扔硬币的结果得到独立概率的一件事情。
standalone 评论(0) 有1044人浏览 2010-09-20 15:10

How to generate permutations

The following algorithm generates the next permutation lexicographically after a given permutation. It changes the given permutation in-place. Find the largest index  k   such that  a ...
standalone 评论(0) 有964人浏览 2010-09-07 23:10

How to delete a node in a LinkList ?

If only given the pointer to the node to be deleted? Note the node is not the first one nor the last.   如果在单链表中删除一个指定的结点? 需要注意的是不是头尾结点。   这到题其实就是个小技巧,没有告诉前面的一个结点怎么做删除呢?答案就是把后面结点的内容拷贝过来!这个问题的前提是结点不能 ...
standalone 评论(0) 有904人浏览 2010-07-06 21:22

用两个栈实现一个队列的功能?

用两个栈,栈A作为入队,栈B作为出队。   enqueue(){    将入队数据压到A的栈顶; } dequeue(){    if B 为空;         if A 不为空;               弹出A数据到B中,然后弹出B的一个数据作为出队数据;         else            队列空;    else         弹出B的一个数据作为出 ...
standalone 评论(0) 有1650人浏览 2010-01-04 10:37

最近博客热门TAG

Java(141741) C(73643) C++(68602) SQL(64557) C#(59604) XML(59131) HTML(59042) JavaScript(54916) .net(54782) Web(54511) 工作(54116) Linux(50906) Oracle(49861) 应用服务器(43285) Spring(40811) 编程(39452) Windows(39380) JSP(37540) MySQL(37266) 数据结构(36420)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics