Redian新闻
>
$25 Gift Card WhenTransfer Prescription @WALGREENS
avatar
$25 Gift Card WhenTransfer Prescription @WALGREENS# PennySaver - 省钱一族
a*0
1
题目很简单 思路就是 level order traverse 其间每一层除了最后一个node 其他的
node的next都指向本层的下一个 最后一个node的next指向null
不过老过不了OJ 报错 而且我自己在eclipse上跑了一下 发现自己跑的结果和报错的情
况不一样 难道是oj错了
/**
* Definition for binary tree with next pointer.
* public class TreeLinkNode {
* int val;
* TreeLinkNode left, right, next;
* TreeLinkNode(int x) { val = x; }
* }
*/
public class Solution {
public void connect(TreeLinkNode root) {

if(root == null)
return;

LinkedList queue = new LinkedList();
queue.add(root);
while(!queue.isEmpty()){
int size = queue.size();
int i=0;
while(i<= size-1){

if(i == size-1){
TreeLinkNode curr = queue.poll();
if(curr.left != null)
queue.offer(curr.left);
if(curr.right != null)
queue.offer(curr.right);

curr.next = null;
i++;
}else{
TreeLinkNode curr = queue.poll();
if(curr.left != null)
queue.offer(curr.left);
if(curr.right != null)
queue.offer(curr.right);

curr.next = queue.peek();
i++;

}


}

}


}
}
oj的信息似乎不对啊
Submission Result: Wrong Answer More Details
Input:
{1,2}
Output:
{1,2,#,2,#}
Expected:
{1,#,2,#}
avatar
M*8
2
Transfer offer expires 5/30/12.
https://www.walgreens.com/images/cart/25dollar-coupon.pdf
This offer is not valid for and cannot be used
by any holder who is a beneficiary of a federal
healthcare program, such as Medicare Part D,
Medicare Advantage, Medicare Part B, Medicaid,
TRICARE or the Federal Employees Health Benefits
Program. Offer not valid in AL, AR, MA, MS, ND,
NJ, NY and PR.
*Purchase of a transferred prescription is
required and coupon must be presented at
prescription payment. Prescriptions cannot
be transferred from another Walgreens or
Duane Reade. Some card restrictions apply.
Transfer offer expires 5/30/12. Not valid
with any other offers. Redeemable in store
only. Coupon must be surrendered at time
of purchase. Limit one card per transaction
avatar
l*g
3
首先,这个需要constant space,用BFS, space是O(n/2)
OJ的结果是对的? 不清楚你的结果为什么1->2,你的code看上去没问题
avatar
j*u
4
呵呵

昨天我晚上看到了
结过我忘鸟。。。。嘎嘎

【在 M*********8 的大作中提到】
: Transfer offer expires 5/30/12.
: https://www.walgreens.com/images/cart/25dollar-coupon.pdf
: This offer is not valid for and cannot be used
: by any holder who is a beneficiary of a federal
: healthcare program, such as Medicare Part D,
: Medicare Advantage, Medicare Part B, Medicaid,
: TRICARE or the Federal Employees Health Benefits
: Program. Offer not valid in AL, AR, MA, MS, ND,
: NJ, NY and PR.
: *Purchase of a transferred prescription is

avatar
a*0
5
我上eclipse跑了 根本没有1-》2啊

【在 l**g 的大作中提到】
: 首先,这个需要constant space,用BFS, space是O(n/2)
: OJ的结果是对的? 不清楚你的结果为什么1->2,你的code看上去没问题

avatar
M*8
6
Offer not valid in AL, AR, MA, MS, ND,NJ, NY and PR
heihei

【在 j******u 的大作中提到】
: 呵呵
: 赞
: 昨天我晚上看到了
: 结过我忘鸟。。。。嘎嘎

avatar
J*A
7
我在leetcode上面试了你的code,accepted了。你估计要清理一下你的浏览器的缓存了
?
avatar
j*u
8
嘎嘎
我早就有心里准备鸟。。。

【在 M*********8 的大作中提到】
: Offer not valid in AL, AR, MA, MS, ND,NJ, NY and PR
: heihei

avatar
M*8
9
momo~~

【在 j******u 的大作中提到】
: 嘎嘎
: 我早就有心里准备鸟。。。

avatar
b*9
10
法恧

【在 M*********8 的大作中提到】
: Offer not valid in AL, AR, MA, MS, ND,NJ, NY and PR
: heihei

avatar
G*8
11
赞。
又要想绿墙的丢,烦恼啊。
avatar
s*1
12
I'm still waiting the walgreens to open in our area.
avatar
l*7
13
貌似绿墙的网点很少哦
avatar
s*e
14
thanks
avatar
A*n
15
什么叫transfer prescription
从别的药店转过去的才可以?

【在 M*********8 的大作中提到】
: Transfer offer expires 5/30/12.
: https://www.walgreens.com/images/cart/25dollar-coupon.pdf
: This offer is not valid for and cannot be used
: by any holder who is a beneficiary of a federal
: healthcare program, such as Medicare Part D,
: Medicare Advantage, Medicare Part B, Medicaid,
: TRICARE or the Federal Employees Health Benefits
: Program. Offer not valid in AL, AR, MA, MS, ND,
: NJ, NY and PR.
: *Purchase of a transferred prescription is

avatar
M*8
16

As of January 31, 2012, the company operates 8,270 locations across all 50
states, the District of Columbia and Puerto Rico.....wiki上说的

【在 l******7 的大作中提到】
: 貌似绿墙的网点很少哦
avatar
M*8
17
是。就是说你的refill从别家换到他家去拿

【在 A********n 的大作中提到】
: 什么叫transfer prescription
: 从别的药店转过去的才可以?

avatar
b*9
18
wg算是三大药店里面网点最多的了
比中国大陆肯德基还多

【在 M*********8 的大作中提到】
: 是。就是说你的refill从别家换到他家去拿
avatar
j*u
19
肯德基疯了
一条街,4家。。。。。。ft

【在 b*******9 的大作中提到】
: wg算是三大药店里面网点最多的了
: 比中国大陆肯德基还多

avatar
k*6
20
那我以前是去rite aid买药的,现在如果去医院看病后去walgreen买药,这样可以吗?
算是transfer prescription吗?
avatar
m*n
21
不算,你去医院看病拿的就是新处方了。
要你一直吃的药可以refill的,你以前在ra拿,现在转去wgs拿才算是转处方。

【在 k*******6 的大作中提到】
: 那我以前是去rite aid买药的,现在如果去医院看病后去walgreen买药,这样可以吗?
: 算是transfer prescription吗?

avatar
m*n
22

打印了就能用吗?正好有药要转。
avatar
q*m
23
新出发去买药可以吗?
avatar
m*n
24
可以买,但拿不到gc,胖子写着要转处方

【在 q****m 的大作中提到】
: 新出发去买药可以吗?
avatar
P*D
25
绿墙不收我的保险——我的保险还是挺普遍的,safeway和rite aid都收。建议大家先
打电话给绿墙pharmacy核实一下是否收自己的保险。
avatar
w*u
26
有限制吗?我有好几个处方的话,是不是每转一个处方都能拿到一个25刀的gift card
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。