Redian新闻
>
Wellness canned cat food 召回~~
avatar
i*p
2
It seems impossible to remove a node (and its memory) from a doubly (bi-directions) linked list without a temp variable to help.
Request:
Don't lose the pointer to the list.
Your comments.
avatar
w*s
3
WellPet LLC, in cooperation with the U.S. Food & Drug Administration
(FDA), is voluntarily recalling certain lots of Wellness
canned cat food.
The recall lots involved in this voluntary recall are:
Wellness Canned Cat Food (all flavors and sizes) with best by dates
from 14APR 13 through 30SEP13; Wellness Canned Cat Food Chicken &
Herring (all sizes) with 10NOV13 or 17NOV13 best buy dates. A full
listing of recalled lots can be found in the FDA recall bulletin at:
http://www.fda.gov/Safety/Recalls/ucm245108.htm
Recent laboratory testing found that the recalled lots might contain
less than adequate levels of thiamine, which can lead to a thiamine
deficiency if consumed regularly by cats. Symptoms of deficiency
displayed by an affected cat can be gastrointestinal or neurological in
nature. If your cat has consumed the recalled lots and has these
symptoms, please contact your veterinarian.
Customers who still have cans of cat food from these lots are advised to
stop feeding them to their cats and call WellPet at (877) 227-9587
Monday through Friday, 9:00 am – 7:00 pm Eastern Time. Consumers with
further questions should visit www.wellnesspetfood.com
If you purchased this item for someone else, please notify the recipient
immediately and provide them with the information in the FDA bulletin
concerning these safety issues.
avatar
h*e
4
可以,只不过没有了那种原生态的鲜味。
avatar
x*n
5
node->prev->next = node->next;
node->next->prev = node->prev;
free(node);
avatar
n*f
6
Seabass冻过清蒸仍然很好吃。

【在 h******e 的大作中提到】
: 可以,只不过没有了那种原生态的鲜味。
avatar
i*p
7
this solution loses the pointer to the link.

【在 x*********n 的大作中提到】
: node->prev->next = node->next;
: node->next->prev = node->prev;
: free(node);

avatar
c*e
8
鲜鱼为什么要冷冻?

【在 g*c 的大作中提到】
: 谢谢
avatar
i*e
9
No it is correct.
It only reposition its previous's next and next's prev node.
the current node still has reference from the pointer.
However, the solution above did not check for NULL (ie, prev or next node
might be NULL).

【在 i**p 的大作中提到】
: this solution loses the pointer to the link.
avatar
g*c
10
买多了,买了两条,两顿才吃了一条

【在 c*********e 的大作中提到】
: 鲜鱼为什么要冷冻?
avatar
i*e
11
Another more interesting problem is to remove a node from a singly linked
list in constant time.
avatar
c*n
12
可以
有时候打折 买多点 现杀了 回家擦干净抽真空冷冻
拿出来口感上没发现什么明显区别

【在 g*c 的大作中提到】
: 谢谢
avatar
i*p
13
For example, we are giving a pointer to the node to be removed. Once the
removing is done, the pointer is pointed to null. We lose the reference to
the list.

【在 i**********e 的大作中提到】
: No it is correct.
: It only reposition its previous's next and next's prev node.
: the current node still has reference from the pointer.
: However, the solution above did not check for NULL (ie, prev or next node
: might be NULL).

avatar
h*r
14
这个主意不错,下次LG钓鱼就让他多带几条,我也冻起来试试。

【在 c******n 的大作中提到】
: 可以
: 有时候打折 买多点 现杀了 回家擦干净抽真空冷冻
: 拿出来口感上没发现什么明显区别

avatar
l*a
15
能说一下你原题的pointer指向什么吗?
删掉结点之后又准备指向什么?

【在 i**p 的大作中提到】
: For example, we are giving a pointer to the node to be removed. Once the
: removing is done, the pointer is pointed to null. We lose the reference to
: the list.

avatar
w*e
16
钓上来的鱼现场处理的话他们鱼鳞刮的很糙 自己还需要多花点时间处理一下弄干净

【在 h**r 的大作中提到】
: 这个主意不错,下次LG钓鱼就让他多带几条,我也冻起来试试。
avatar
i*p
17
In the beginning the pointer points to the node to be removed. After the
node is removed, the pointer needs to point some node in the list so that we
can access the list by the pointer.

【在 l*****a 的大作中提到】
: 能说一下你原题的pointer指向什么吗?
: 删掉结点之后又准备指向什么?

avatar
i*e
18
There should be two nodes referencing the list.
One is the node pointing to the node you want to delete, the other point to
the head of the list.

we

【在 i**p 的大作中提到】
: In the beginning the pointer points to the node to be removed. After the
: node is removed, the pointer needs to point some node in the list so that we
: can access the list by the pointer.

avatar
i*p
19
OK, let me change the question like this.
A list with 8 nodes is pointed to the head by a pointer. Is it possible to
remove the 3rd node and its memory without any other variable helping?
the list is a doubly bi-direction linked.

to

【在 i**********e 的大作中提到】
: There should be two nodes referencing the list.
: One is the node pointing to the node you want to delete, the other point to
: the head of the list.
:
: we

avatar
l*a
20
1)u want to use this pointer to delete this node
2) u need to adjust its previous node and next node to make sure that
they have no relationship with this node
then u can delete this node
3) after u delete this node use this pointer, how can u let it point to the
others?
now u can't use its pre/next node to delete this node as well.
so what u said is a paradox

we

【在 i**p 的大作中提到】
: In the beginning the pointer points to the node to be removed. After the
: node is removed, the pointer needs to point some node in the list so that we
: can access the list by the pointer.

avatar
i*p
21
So you indirectly say "no" to the question.
But I will say it is possible.

the

【在 l*****a 的大作中提到】
: 1)u want to use this pointer to delete this node
: 2) u need to adjust its previous node and next node to make sure that
: they have no relationship with this node
: then u can delete this node
: 3) after u delete this node use this pointer, how can u let it point to the
: others?
: now u can't use its pre/next node to delete this node as well.
: so what u said is a paradox
:
: we

avatar
i*p
22
Here is my answer.
move the pointer, say P pointing to the 2nd node, the one before the removed
one.
P->next = p->next->next;
free(P->next->Pre);
P->next->pre = p;

【在 i**p 的大作中提到】
: So you indirectly say "no" to the question.
: But I will say it is possible.
:
: the

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。