a*a
2 楼
最近伸了amex blue preferred 和chase sapphire,同时给ld申请副卡,这两卡都都有
比如花够1000 返150,和年费,问题是:1)主卡和副卡分别花到1000,
两张都能反150(共300),还是加起来总共150? 2)年费是交一份还是两
份。 多谢了
比如花够1000 返150,和年费,问题是:1)主卡和副卡分别花到1000,
两张都能反150(共300),还是加起来总共150? 2)年费是交一份还是两
份。 多谢了
s*e
3 楼
诺基亚地图,照相,无线充电和独特的外观,没有理由不用lumia920
g*g
5 楼
虽然没用过blue和sap。应该是一个账户 (不管你有几个副卡),一个年费,一次
bonus。
bonus。
W*r
6 楼
用Stack,模拟BT的遍历过程,把节点压到Stack里去
g*0
9 楼
It looks like for each node n, you need to swap the node->left and node->
right. You can use BFS to push all nodes to a queue/array, then process one
node at a time.
Or like WindFollower said, use a stack.
right. You can use BFS to push all nodes to a queue/array, then process one
node at a time.
Or like WindFollower said, use a stack.
r*n
10 楼
感觉可以模仿postorder的iterative 方法写,也应该得加个visited flag
如下:
void mirror(Node* root)
{
if (root == NULL)
return;
mirror(root->left);
mirror(root->right);
Node* tmp =root->left;
root->left=root->right;
root->right=tmp;
}
void mirror_iter(Node* root)
{
if (root == NULL)
return;
stack nodeStack;
nodeStack.push(root);
while (!nodeStack.empty())
{
Node* curr=nodeStack.top();
if (curr->left != NULL && curr->left->visted==false)
{
nodeStack.push(curr->left);
}
else
{
if (curr->right != NULL && curr->right->visited==false)
{
nodeStack.push(curr->right);
}
else
{
curr->visited=true;
Node* tmp = curr->left;
curr->left=curr->right;
curr->right=tmp;
nodeStack.pop();
}
}
}
}
【在 p*****a 的大作中提到】
: 能详细说一下吗?
如下:
void mirror(Node* root)
{
if (root == NULL)
return;
mirror(root->left);
mirror(root->right);
Node* tmp =root->left;
root->left=root->right;
root->right=tmp;
}
void mirror_iter(Node* root)
{
if (root == NULL)
return;
stack
nodeStack.push(root);
while (!nodeStack.empty())
{
Node* curr=nodeStack.top();
if (curr->left != NULL && curr->left->visted==false)
{
nodeStack.push(curr->left);
}
else
{
if (curr->right != NULL && curr->right->visited==false)
{
nodeStack.push(curr->right);
}
else
{
curr->visited=true;
Node* tmp = curr->left;
curr->left=curr->right;
curr->right=tmp;
nodeStack.pop();
}
}
}
}
【在 p*****a 的大作中提到】
: 能详细说一下吗?
相关阅读
OPPO Find 7 高大上的广告貌似T-Mobile计算流量也没那么精确ATT samsung galaxy s4 (SCH-i337) 转到 H2O 问题 (转载)用了两年多的旧手机att如何解锁?现在还没有带自动转发的免费邮箱?(非国内的)Plexserver可以直接cast到chromecast么?Q5II怎么装狗狗的play store?问一下,android下面有真收音机app吗?有些人总喜欢为了些虚无的honor而战windows的组策略真是太脑残了转几乎全新Thinkpad Tablet 2,有笔,office 2013,及国内买的套子和键盘。dv8p绝配键盘 便宜登场国产app最变态的一点就是推送HTC M8使用感想买apple airport extreme还是Asus RT-AC68U?ebay上买了个t-mobile的nexus 7,如果这样情况是不是过几天就得进bad iemi啊?悟空助手应该算是流氓软件三天新乐视盒子死了,求助!$69.99 Samsung Galaxy Victory Virgin Mobile 4G LTE No Contract Smart Phone » only $69.99 SAbbot Shi Yongxin (转载)