B*g
2 楼
不要把F5,ctrl+r按坏了
不要拿着140的approval notice老看容易看坏,就是看也别撮PD那一嘎的
不要拿着140的approval notice老看容易看坏,就是看也别撮PD那一嘎的
h*a
3 楼
谢谢
s*g
4 楼
估计窦文涛也没见过几个这么不配合的嘉宾哈哈
r*1
6 楼
但是给的 tracking number 还显示 not found!
s*t
7 楼
你是说倒着的BFS?
n*s
8 楼
LOL.
f*u
10 楼
对啊,看看自己是不是EB2,别像以前版上的人,快到了才发现自己是EB3.
s*t
11 楼
正常bfs打印到一个临时的buffer中,然后从buf打出倒序?
p
p
c*h
12 楼
你的到了没?
l*g
17 楼
一个queue应该就可以了,我把code贴出来了。如果有错误的话,请指正。
printByLevel(Node *root)
{
Queue queue;
int currLevel = 1; /* total number of nodes on the current level */
int currPos = 0; /* current position on the current level */
int nextLevel = 0; /* total number of nodes on the next level */
queue.enqueue(root);
while(currLevel>0)
{
Node *curr = queue.dequeue();
printNode(curr);
if(curr->left){
queue.enqueue(curr->left);
nextL
printByLevel(Node *root)
{
Queue
int currLevel = 1; /* total number of nodes on the current level */
int currPos = 0; /* current position on the current level */
int nextLevel = 0; /* total number of nodes on the next level */
queue.enqueue(root);
while(currLevel>0)
{
Node *curr = queue.dequeue();
printNode(curr);
if(curr->left){
queue.enqueue(curr->left);
nextL
s*t
18 楼
他的意思是要反向打印
比如:
a
b c
d e f g
打印成
d e f g
b c
a
*/
*/
【在 l*******g 的大作中提到】
: 一个queue应该就可以了,我把code贴出来了。如果有错误的话,请指正。
: printByLevel(Node *root)
: {
: Queue queue;
: int currLevel = 1; /* total number of nodes on the current level */
: int currPos = 0; /* current position on the current level */
: int nextLevel = 0; /* total number of nodes on the next level */
: queue.enqueue(root);
: while(currLevel>0)
: {
比如:
a
b c
d e f g
打印成
d e f g
b c
a
*/
*/
【在 l*******g 的大作中提到】
: 一个queue应该就可以了,我把code贴出来了。如果有错误的话,请指正。
: printByLevel(Node *root)
: {
: Queue
: int currLevel = 1; /* total number of nodes on the current level */
: int currPos = 0; /* current position on the current level */
: int nextLevel = 0; /* total number of nodes on the next level */
: queue.enqueue(root);
: while(currLevel>0)
: {
c*f
19 楼
是不是用1个queue一个deque?
相关阅读
看book/paper 用kindle eink如何Walmart Lumia 920 Cyan运出来了大家在安卓上用什么音乐播放器下载歌曲对抗Win8涨价,PC厂商挟Chrome OS反击微软bb昨天出门买菜光天化日之下被抢劫了SURFACE 转我的Nexus 7不能开机了,没有摔过,自己有可能修好吗?Lumia 920的做工还真是不错MTK和Google就是人类的希望,没有之二谁还有老版本的酷狗?Nokia Drive 还需要下在地图吗?软软早年说了有买nvidia的优先权,2月份之后,n4就敞开随便买了。忍不住吐槽一下metro ieebay上买iphone4 unlock code,结果code就是unlocked 坑爹啊SKYDRIVE里面能不能快速select multiple picturesZ10上下那两条大黑边丑暴了!传说N7要步入1080P了?现在什么板子配onenote最给力?无脑入了nexus7