Redian新闻
>
刚才给ebay的印度mm打电话
avatar
刚才给ebay的印度mm打电话# PhotoGear - 摄影器材
s*n
1
给了这么长一道题,光读就读了半天
Write a Java function, printTree(), which prints a given tree in depth first
format to stdout. Details:
The argument of printTree is a stream of pairs of string values.
Each string found anywhere in the input represents a unique node.
Each item in the stream is a pair indicating a parent/child relationship
in the tree. The first element in the pair is the parent. The second
element in the pair is the child.
Each parent can have many children.
The input list may contain relationship pairs in any order, although:
The order in which the pairs appear in the input list determines the nodes’
order with respect to its siblings.
public static class Edge {
String parent;
String child;
public static Edge of(String parent, String child) { ... }
}
Example input:
List input = newArrayList();
input.add(Edge.of(“cat”, “lion”));
input.add(Edge.of(“mammal”, “cat”));
input.add(Edge.of(“animal”, “fish”));
// Note that the list of nodes is disjoint at this point.
input.add(Edge.of(“animal”, “mammal”));
input.add(Edge.of(“animal”, “bird”));
input.add(Edge.of(“lifeform”, “animal”));
TreePrinter.printTree(input);
Expected output:
lifeform
animal
fish
mammal
cat
lion
bird
avatar
a*n
2
请问是这样的么?
avatar
c*e
3
她把nikon也读作尼康, 而不是奶康,有意思
avatar
l*8
4
谢谢分享
先建树,然后输出。 其实是两道小题

first


【在 s****n 的大作中提到】
: 给了这么长一道题,光读就读了半天
: Write a Java function, printTree(), which prints a given tree in depth first
: format to stdout. Details:
: The argument of printTree is a stream of pairs of string values.
: Each string found anywhere in the input represents a unique node.
: Each item in the stream is a pair indicating a parent/child relationship
: in the tree. The first element in the pair is the parent. The second
: element in the pair is the child.
: Each parent can have many children.
: The input list may contain relationship pairs in any order, although:

avatar
a*m
5
如果公司配合,也有可能吧。
avatar
r*j
6
有些老外读尼康,有些读奶康。
我也在郁闷
avatar
p*2
7
用个hashtable代表树就好了吧。
avatar
r*u
8
Yes, even he is not working for that company at this time.
it is for future work.

【在 a***n 的大作中提到】
: 请问是这样的么?
avatar
s*s
9
日语里本来就是念/nikon/
美国人土,念错了而已
类似的还有IKEA,在瑞典语系的发音应该就是/eekeea/而不是/aikeea/

【在 c*****e 的大作中提到】
: 她把nikon也读作尼康, 而不是奶康,有意思
avatar
B*n
10
可以
avatar
b*e
11
这叫方言。

【在 s**********s 的大作中提到】
: 日语里本来就是念/nikon/
: 美国人土,念错了而已
: 类似的还有IKEA,在瑞典语系的发音应该就是/eekeea/而不是/aikeea/

avatar
l*n
12
Yes. for future work.
avatar
k*t
13
米凯狼几罗 到了美国给念成马爱可, 安得罗, 拆开倒刚好是两个英文名字
avatar
c*g
14
当然可以
avatar
b*8
15
主要是Nai sound听起来更悦耳,比如Nike 如果发Neekee 听起来怪怪的。当然Nicole
如果念成奶寇,听着也别扭。
谁知道Suse Linux到底怎么念?
avatar
C*i
16
HR,律师和老板给力就行。
一般是不敢指望他们给力,细节很多不懂也不接受改变,才是常态阿。
avatar
N*w
17
肯定是念俗死。。。你来死。。

Nicole

【在 b**********8 的大作中提到】
: 主要是Nai sound听起来更悦耳,比如Nike 如果发Neekee 听起来怪怪的。当然Nicole
: 如果念成奶寇,听着也别扭。
: 谁知道Suse Linux到底怎么念?

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