本月博客排行
-
第1名
wy_19921005 -
第2名
mft8899 -
第3名
java-007 - Anmin
- benladeng5225
年度博客排行
-
第1名
龙儿筝 -
第2名
宏天软件 -
第3名
benladeng5225 - wy_19921005
- vipbooks
- kaizi1992
- 青否云后端云
- e_e
- tanling8334
- sam123456gz
- arpenker
- zysnba
- fantaxy025025
- xiangjie88
- wallimn
- lemonhandsome
- jh108020
- ganxueyun
- Xeden
- xyuma
- zhanjia
- wangchen.ily
- johnsmith9th
- zxq_2017
- forestqqqq
- jbosscn
- daizj
- ajinn
- xpenxpen
- 喧嚣求静
- kingwell.leng
- lchb139128
- kristy_yy
- jveqi
- javashop
- lzyfn123
- sunj
- yeluowuhen
- lerf
- silverend
- chenqisdfx
- xiaoxinye
- flashsing123
- bosschen
- lyndon.lin
- zhangjijun
- sunnylocus
- lyj86
- paulwong
- sgqt
最新文章列表
记一次面试
今天参加了一个phone interview,有几道题自己还记着。
1. c++析构函数为啥是虚函数。
2. 四个cast。
3. 类初始化列表。编译器为什么要按照声明中的顺序初始化?
4. 一个空类,编译器帮你实现了哪些default的函数。
4. IQ题。假设三个事件A,B,C,给你两枚硬币,如果根据扔硬币的结果得到独立概率的一件事情。
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 ...
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.
如果在单链表中删除一个指定的结点? 需要注意的是不是头尾结点。
这到题其实就是个小技巧,没有告诉前面的一个结点怎么做删除呢?答案就是把后面结点的内容拷贝过来!这个问题的前提是结点不能 ...
用两个栈实现一个队列的功能?
用两个栈,栈A作为入队,栈B作为出队。
enqueue(){
将入队数据压到A的栈顶;
}
dequeue(){
if B 为空;
if A 不为空;
弹出A数据到B中,然后弹出B的一个数据作为出队数据;
else
队列空;
else
弹出B的一个数据作为出 ...