随笔分类 -  链表

摘要:Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists: A: ... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(148) 评论(0) 推荐(0)
摘要:Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1-... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(149) 评论(0) 推荐(0)
摘要:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 我的解决方案:... 阅读全文
posted @ 2017-11-17 22:27 wangyaning 阅读(166) 评论(0) 推荐(0)
摘要:Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2.... 阅读全文
posted @ 2017-11-17 22:27 wangyaning 阅读(98) 评论(0) 推荐(0)