avatar
VB 8月排期出来了# EB23 - 劳工卡
c*i
1
VOA Chinese, Jan 17, 2011.
http://www.voanews.com/chinese/news/20110117-Giffords-met-her-h
("由于工作关系,两人维持着远距离婚姻")
Note:
(a) Mark E Kelly. NASA, undated.
http://www.jsc.nasa.gov/Bios/htmlbios/kellyme.html
(Organization: Fellow of the National Committee on U.S. China Relations)
He was born in 1964, making him 46 years old.
(b) The VOA report states, "美国之音2006年采访过凯利,他谈到了他到中国参加美
中杰出青年领导人论坛的经历。
New York Times every Sunday publishes for free "Weddings and Announcements"
and select one couple to give a VIP treatment. Here is
Gabrielle Giffords and Mark Kelly, New York Times (NYT), Dec 2, 2007.
http://www.nytimes.com/2007/12/02/fashion
/weddings/02vows.html?_r=1
("'We met four years ago in China, as young leaders selected by the National
Committee on U.S.-China Relations,' said Ms. Giffords")
(i) Robert B. Reich was Secretary of Labor in the first Clinton
administration.
(ii) The VOA report states, "他们两人2004年在中国相遇." But NYT said in 2007
that "'We met four years ago in China" when it was 2003. The sequence of
teh events in NYT is more convincing.
(iii) The VOA report is also mistaken when it reported, "40岁的吉福兹6年前当
选国会议员." It is well known that the congresswoman was first elected in
2006.
(iv) Beautiful Day
http://en.wikipedia.org/wiki/Beautiful_Day
(released 2000)
(v) United States Merchant Marine Academy
http://en.wikipedia.org/wiki/United_States_Merchant_Marine_Acad
(one of the five United States service academies; Established 1942)
(vi) Kings Point, New York
http://en.wikipedia.org/wiki/Kings_Point,_New_York
(a village)
(vii) For Capra-corn, see Frank Capra
http://en.wikipedia.org/wiki/Frank_Capra
(1897-1991; Capra films usually carry a definite message about the basic
goodness of human nature and show the value of unselfishness and hard work.
His wholesome, feel-good themes have led some to term his style Capra-corn,
but those who hold his vision in high regard prefer the term Capraesque)
* The "corn" is derived from
corny (adj):
"2: of or relating to corn
3: mawkishly old-fashioned : tiresomely simple and sentimental jokes>"
www.m-w.com
avatar
z*0
2
请不要嘲笑我的无知,我在看cc150的时候,给的答案都是用LinkedListNode,但是我
在java编辑中,LinkedListNode 下面是红色的波浪,说没有此定义的class。我在网上
搜索 找到了 http://fisheye.igniterealtime.org/browse/openfire/trunk/src/java/org/jivesoftware/util/LinkedListNode.java?r=13651&r=13651 这个网址,我下载了这里得linkelistnode得定义。感觉还是不对。
根据我对答案的理解,她用的是一个双向链表,于是我写了这个class:
package cc150;
public class dNode {
private dNode pre = null;
private dNode next = null;
private int data;

dNode(int data){
this.data = data;
}

void addNode(dNode cur, int i){
dNode newNode = new dNode(i);

if(cur == null){
cur = newNode;
}else{
while(cur.getNext() != null){
cur = cur.getNext();
}
cur.setNext(newNode);
newNode.setPre(cur);
cur = newNode;
}
}

void removeNode(dNode cur){
cur.getPre().setNext(cur.getNext());
cur.getNext().setPre(cur.getPre());
}

dNode getPre(){
return pre;
}

dNode getNext(){
return next;
}

int getData(){
return data;
}

void setPre(dNode pre){
this.pre = pre;
}

void setNext(dNode next){
this.next = next;
}

void setData(int data){
this.data = data;
}
}
在解这道题的第一步可以用 buffer的时候,我是这么写的:
public static void deleteDup(dNode cur){//with temporary buffer
HashMap list = new HashMap();

while(cur.getNext() != null){
if(list.containsValue(cur.getData())){
cur.removeNode(cur);
}else{
list.put(null, cur.getData());
}
cur = cur.getNext();
}
}
public static void print(String s, dNode test){
while(test != null ){
System.out.println(s+" "+test.getData());
test = test.getNext();
}
}
public static void main(String[] args){
dNode n1 = new dNode(1);
n1.addNode(n1, 1);
n1.addNode(n1, 2);
n1.addNode(n1, 3);

print("Before deleting", n1);

deleteDup(n1);

print("After deleting", n1);

}
第二步 不可以用buffer 我是这么写的:
public static void deleteDup2(dNode n){//without buffer
dNode cur = n;
dNode check = n;
while(cur != null){
check = cur.getPre();
while(check != null){
if(cur.getData() == check.getData()){
cur.removeNode(cur);
}
check = check.getPre();
}
cur = cur.getNext();
}
}
因为是第一次刷题,我不知道我这样写有没有不妥之处,想要实现的功能是可以实现的
。希望路过的大神帮我看一下。
如果有大神能告诉我 linkedlistnode 怎么才能用,跪谢 :)
avatar
t*4
3
eb2 and eb3 继续保持在10年一月
估计也没人关心了
avatar
l*n
4
LinkedListNode没定义你写一个就好了,而且也不用搞太多包装。
class LinkedListNode {
int val;
LinkedListNode next;
}

【在 z*****0 的大作中提到】
: 请不要嘲笑我的无知,我在看cc150的时候,给的答案都是用LinkedListNode,但是我
: 在java编辑中,LinkedListNode 下面是红色的波浪,说没有此定义的class。我在网上
: 搜索 找到了 http://fisheye.igniterealtime.org/browse/openfire/trunk/src/java/org/jivesoftware/util/LinkedListNode.java?r=13651&r=13651 这个网址,我下载了这里得linkelistnode得定义。感觉还是不对。
: 根据我对答案的理解,她用的是一个双向链表,于是我写了这个class:
: package cc150;
: public class dNode {
: private dNode pre = null;
: private dNode next = null;
: private int data;
:

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