开发者

two links attached end to end

I read a sentence saying two links attached end-to-end. What does it look like?

Suppose we have

L1->A->B->C->D

and

L2->a->b->c->d

should it be

1)

L1->A->B->C->D->L2->a->b->c->d
开发者_如何学编程

or

2)

L1->A->B->C->D-> d<-c<-b<-a<-L2


I would say the first one. The second one doesn't make much sense to me (ie I can't think of a good use for such a structure, unless you were creating a graph, but it doesn't seem like your problem/book/chapter is talking about that right now.) Both links point to 'd' but still terminate there, which doesn't seem as useful as being able to take 2 linked lists and create one big one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜