160、两个单链表的公共节点

2016-04-07  本文已影响18人  BeijingIamback

Notes:

If the two linked lists have no intersection at all, return null.

The linked lists must retain their original structure after the function returns.

You may assume there are no cycles anywhere in the entire linked structure.

Your code should preferably run in O(n) time and use only O(1) memory.

代码:

上一篇 下一篇

猜你喜欢

热点阅读