木落长安rr

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2019年3月29日

摘要: 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 @ 2019-03-29 15:23 木落长安rr 阅读(145) 评论(0) 推荐(0) 编辑

摘要: Remove all elements from a linked list of integers that have value val. Example: 本题的思路很简单,就是单纯的删除链表元素操作,如果头结点的元素就是给定的val值,需要借助虚结点dummy去判断。 方法一:(C++) C 阅读全文
posted @ 2019-03-29 15:13 木落长安rr 阅读(148) 评论(0) 推荐(0) 编辑

摘要: Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (black) initially contains only the first elem 阅读全文
posted @ 2019-03-29 10:58 木落长安rr 阅读(222) 评论(0) 推荐(0) 编辑

摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, we use 阅读全文
posted @ 2019-03-29 10:05 木落长安rr 阅读(159) 评论(0) 推荐(0) 编辑