二叉树的右视图
求根到叶子节点数字之和
复制带随机指针的链表
路径总和II
printf缓冲区问题
这里就要区分一下标准库函数和系统调用了。
系统调用是内核提供给上层程序的接口,能够实现内核和上层之间的交互,系统调用在内核中的实现是软中断的方式,通过相应的中断服务例程来实现,
Crossing River
来源POJ第1700题Crossing River
Description
A group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle arrangement must be arranged in order to row the boat back and forth so that all people may cross.
Median
来源POJ第3579题Median
Description
Given N numbers, X1, X2, … , XN, let us calculate the difference of every pair of numbers: ∣Xi - Xj∣ (1 ≤ i < j ≤ N). We can get C(N,2) differences through this work,