随笔分类 -  linked list(removal)

82. Remove Duplicates from Sorted List II
摘要:Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example 1: Example 2: 阅读全文

posted @ 2018-07-18 09:17 猪猪🐷

83. Remove Duplicates from Sorted List
摘要:Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Example 2: 阅读全文

posted @ 2018-07-18 09:16 猪猪🐷

19. Remove Nth Node From End of List
摘要:Given a linked list, remove the n-th node from the end of list and return its head. Example: Note: Given n will always be valid. Follow up: Could you 阅读全文

posted @ 2018-07-18 09:15 猪猪🐷

237. Delete Node in a Linked List
摘要:Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Given linked list -- head = [4,5,1,9], wh 阅读全文

posted @ 2018-07-18 09:14 猪猪🐷

203. Remove Linked List Elements
摘要:Remove all elements from a linked list of integers that have value val. Example: 阅读全文

posted @ 2018-07-18 09:13 猪猪🐷

导航